/*
Theme Name: GeneratePress Child
Template: generatepress
Version: 1.0
*/

/* --- Premium Apple Design System & Tokens --- */
:root {
    --apple-black: #1d1d1f;
    --apple-dark-gray: #424245;
    --apple-gray: #86868b;
    --apple-light-gray: #f5f5f7;
    --apple-border: #e5e5ea;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-header-bg: rgba(22, 22, 23, 0.85);
    --apple-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Global Typography Override */
body, 
input, 
textarea, 
select, 
button {
    font-family: var(--apple-font) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--apple-black);
}

body {
    background-color: #ffffff !important;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

body.mobile-menu-active {
    overflow: hidden; /* Lock scroll when mobile menu is active */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--apple-font) !important;
    color: var(--apple-black);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 0;
    margin-bottom: 0.5em;
}

p {
    color: var(--apple-dark-gray);
    margin-top: 0;
    margin-bottom: 1em;
}

/* Premium Apple-Style Buttons */
.apple-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 980px;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    outline: none;
}

.apple-btn.primary-btn {
    background-color: var(--apple-blue);
    color: #ffffff !important;
}

.apple-btn.primary-btn:hover {
    background-color: var(--apple-blue-hover);
    transform: scale(1.02);
}

.apple-btn.secondary-btn {
    background-color: transparent;
    color: var(--apple-blue) !important;
    padding-left: 0;
    padding-right: 0;
}

.apple-btn.secondary-btn:hover {
    color: var(--apple-blue-hover) !important;
}

/* --- Dark Navigation Header (Шапка темная) --- */
.compact-site-header {
    background-color: var(--apple-header-bg) !important;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 52px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.compact-header-container {
    max-width: 1024px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Branding (Logo & Title) */
.compact-branding {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compact-branding .custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.compact-branding .custom-logo-link img {
    height: 26px !important;
    width: auto !important;
    display: block;
}

.compact-site-title {
    color: #f5f5f7 !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    letter-spacing: -0.01em !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.compact-site-title:hover {
    color: #ffffff !important;
}

/* Desktop Navigation Menu */
.compact-nav {
    display: block;
}

.compact-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
}

.compact-menu-list li {
    position: relative;
}

.compact-menu-list li a {
    color: #cccccc !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    letter-spacing: 0.01em !important;
    padding: 6px 14px !important;
    border-radius: 6px;
    display: block;
    transition: color 0.2s ease, background-color 0.2s ease !important;
    text-decoration: none !important;
}

.compact-menu-list li a:hover,
.compact-menu-list li.current-menu-item > a {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Dropdown sub-menus on hover */
.compact-menu-list li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(22, 22, 23, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
    padding: 6px !important;
    margin: 0;
    list-style: none;
    min-width: 180px;
    z-index: 100;
}

.compact-menu-list li:hover ul {
    display: block;
}

.compact-menu-list li ul li a {
    color: #cccccc !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
}

.compact-menu-list li ul li a:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Mobile Toggle Toggle Button */
.compact-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px 4px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
}

.toggle-line {
    display: block;
    width: 18px;
    height: 1.5px;
    background-color: #ffffff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Toggle lines transforms on active */
.compact-menu-toggle.is-active .line-1 {
    transform: translateY(6.5px) rotate(45deg);
}

.compact-menu-toggle.is-active .line-2 {
    opacity: 0;
}

.compact-menu-toggle.is-active .line-3 {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Menu Drawer Overlay */
.mobile-menu-drawer {
    display: block;
    position: fixed;
    top: 52px;
    left: 0;
    width: 100%;
    height: calc(100vh - 52px);
    background-color: rgba(22, 22, 23, 0.98) !important;
    backdrop-filter: blur(20px);
    z-index: 999;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
    box-sizing: border-box;
}

.mobile-menu-drawer.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer-nav {
    width: 100%;
    height: 100%;
    padding: 40px 32px;
    box-sizing: border-box;
}

.mobile-drawer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-drawer-menu-list li a {
    color: #cccccc !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    text-decoration: none !important;
    display: block;
    transition: color 0.2s ease;
}

.mobile-drawer-menu-list li a:hover,
.mobile-drawer-menu-list li.current-menu-item > a {
    color: #ffffff !important;
}

/* Hide standard theme elements */
.main-navigation,
.site-header {
    display: none !important; /* Force override GeneratePress header */
}

.compact-site-header {
    display: flex !important; /* Ensure our compact header is shown */
}

/* --- Clean Light Body Content Blocks --- */
.site-content {
    background-color: #ffffff !important;
    padding: 0 !important;
}

.site-main {
    margin: 0 !important;
}

/* --- Apple-Style Footer --- */
.apple-site-footer {
    background-color: var(--apple-light-gray) !important;
    color: var(--apple-gray) !important;
    font-family: var(--apple-font);
    font-size: 12px;
    line-height: 1.6;
    border-top: 1px solid var(--apple-border) !important;
    padding: 40px 0 32px 0 !important;
    box-sizing: border-box;
}

.apple-footer-container {
    max-width: 1024px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

.apple-footer-directory {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 24px;
}

.apple-footer-directory-column-title {
    color: var(--apple-black) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
    letter-spacing: -0.01em !important;
}

.apple-footer-directory-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apple-footer-directory-links li {
    color: var(--apple-dark-gray);
    margin: 0;
    padding: 0;
}

.apple-footer-link {
    color: var(--apple-dark-gray) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.apple-footer-link:hover {
    color: var(--apple-black) !important;
    text-decoration: underline !important;
}

.apple-footer-directory-links.detail-list {
    color: var(--apple-dark-gray);
}

.apple-footer-directory-links.detail-list li {
    font-weight: 400;
}

.apple-footer-divider {
    border: 0;
    border-top: 1px solid var(--apple-border);
    margin: 20px 0;
}

.apple-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--apple-gray);
    font-size: 11px;
}

.apple-footer-copyright {
    margin-right: 24px;
}

.apple-footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.apple-footer-legal-links .apple-footer-link {
    color: var(--apple-dark-gray) !important;
}

.apple-footer-legal-links .apple-footer-link:hover {
    color: var(--apple-black) !important;
}

.apple-footer-legal-separator {
    color: var(--apple-border);
    user-select: none;
}

/* Responsive Footer adjustments */
@media (max-width: 768px) {
    .apple-footer-directory {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .apple-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .apple-footer-legal-links {
        gap: 8px;
    }
}

/* Responsive Menu Switch */
@media (max-width: 768px) {
    .compact-nav {
        display: none;
    }
    
    .compact-menu-toggle {
        display: flex;
    }
}

/* ==========================================================================
   APPLE RECENT POSTS WIDGET STYLING
   ========================================================================== */

.widget .apple-recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.apple-recent-post-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 16px;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
}

.apple-recent-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

.apple-post-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.apple-post-card-category {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--apple-blue);
    margin-bottom: 2px;
}

.apple-post-card-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--apple-black) !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.apple-recent-post-card:hover .apple-post-card-title {
    color: var(--apple-blue-hover) !important;
}

.apple-post-card-date {
    font-size: 11px;
    color: var(--apple-gray);
    margin-top: 2px;
}

.apple-post-card-image-wrap {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--apple-light-gray);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.apple-post-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.apple-recent-post-card:hover .apple-post-card-image-wrap img {
    transform: scale(1.05);
}

.apple-no-posts {
    font-size: 14px;
    color: var(--apple-gray);
    text-align: center;
    padding: 20px 0;
    margin: 0;
}

