/*
Theme Name: TinyTuneKids
Theme URI: https://example.com/tinytunekids
Author: TinyTuneKids
Author URI: https://example.com
Description: A cheerful classic WordPress theme for TinyTuneKids – Nursery Rhymes & Songs.
Version: 1.0.0
Text Domain: tinytunekids
Tags: entertainment, education, blog, custom-logo, custom-background
*/

/* TinyTuneKids header search */
.ttk-header-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 14px;
}

.ttk-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

.ttk-search-toggle:hover,
.ttk-search-toggle:focus-visible {
    opacity: 0.85;
    outline: none;
}

.ttk-search-form {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 999;
    display: none;
    align-items: center;
    gap: 8px;
    min-width: 280px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.ttk-header-search.is-open .ttk-search-form {
    display: flex;
}

.ttk-search-field {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 10px 12px;
    line-height: 1.2;
}

.ttk-search-submit {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
}

.site-header .main-navigation,
.site-header .menu,
.site-header .nav-menu,
.header-navigation,
.header-inner,
.header-wrap,
.site-header-inner {
    display: flex;
    align-items: center;
}

.site-header .main-navigation,
.header-navigation {
    gap: 14px;
}

@media (max-width: 768px) {
    .ttk-header-search {
        margin-left: 10px;
    }

    .ttk-search-form {
        right: -8px;
        min-width: 240px;
    }
}


/* Header & Footer Settings UI */
.site-header {
    position: relative;
}

.ttk-header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 14px;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    background: rgba(0,0,0,0.08);
    color: inherit;
}

.ttk-site-footer {
    padding: 44px 20px 18px;
}

.ttk-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.ttk-footer-brand {
    max-width: 520px;
}

.ttk-footer-title {
    margin: 0 0 12px;
}

.ttk-footer-text,
.ttk-footer-copy {
    margin: 0;
    opacity: 0.95;
}

.ttk-footer-nav ul,
.ttk-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ttk-footer-menu li {
    margin-bottom: 8px;
}

.ttk-footer-menu a {
    text-decoration: none;
}

.ttk-footer-bottom {
    max-width: 1200px;
    margin: 24px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

@media (max-width: 768px) {
    .ttk-header-button {
        margin-left: 10px;
        padding: 9px 14px;
    }
    .ttk-footer-inner {
        flex-direction: column;
    }
}


/* Layout orientation settings */
.ttk-header-main {
    width: 100%;
}

.site-header.ttk-layout-horizontal .ttk-header-main > * {
    display: inline-flex;
    vertical-align: middle;
}

.site-header.ttk-layout-vertical .ttk-header-main > * {
    width: 100%;
}

.site-header.ttk-layout-vertical .ttk-header-button,
.site-header.ttk-layout-vertical .ttk-header-search {
    margin-left: 0;
}

.site-footer.ttk-layout-vertical .ttk-footer-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-footer.ttk-layout-horizontal .ttk-footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.site-footer.ttk-align-center .ttk-footer-menu {
    justify-content: center;
}

.site-footer.ttk-align-right .ttk-footer-menu {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .site-header .ttk-header-main,
    .site-footer .ttk-footer-inner {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
}


/* Advanced header/footer controls */
.site-header .ttk-header-main {
    min-height: inherit;
}

.site-header .menu,
.site-header .nav-menu,
.site-header .main-navigation ul {
    display: flex;
    align-items: center;
}

.site-footer .ttk-footer-inner {
    display: grid;
    gap: 24px;
}

.ttk-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ttk-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    text-decoration: none;
}

.site-header.ttk-layout-vertical .main-navigation ul,
.site-header.ttk-layout-vertical .menu,
.site-header.ttk-layout-vertical .nav-menu {
    flex-direction: column;
}

.site-header.ttk-align-center .ttk-footer-social {
    justify-content: center;
}

.site-footer.ttk-align-right .ttk-footer-social {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .site-footer .ttk-footer-inner {
        grid-template-columns: 1fr !important;
    }
}


/* Pro header/footer controls */
.ttk-mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.ttk-mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.ttk-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.ttk-footer-newsletter {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
}

.ttk-footer-newsletter-title {
    margin: 0 0 10px;
}

.ttk-footer-newsletter-text {
    margin: 0 0 12px;
}

.ttk-footer-newsletter-form form,
.ttk-footer-newsletter-form .mailerlite-form {
    width: 100%;
}

.ttk-footer-social a {
    gap: 8px;
}

.ttk-footer-social svg {
    flex: 0 0 auto;
}

.site-header.ttk-layout-horizontal .ttk-header-main {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .ttk-header-search {
        margin-left: 0;
    }

    .ttk-header-button {
        margin-left: 0;
    }

    .ttk-topbar {
        font-size: 14px;
    }
}


/* Premium header/footer builder controls */
.site-header {
    transition: min-height 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.site-header .ttk-header-main {
    transition: padding 0.25s ease;
}

.ttk-header-button {
    transition: filter 0.2s ease, transform 0.2s ease;
}

.ttk-header-button:hover {
    transform: translateY(-1px);
}

.ttk-footer-bottom-note {
    margin: 0;
    opacity: 0.92;
}

.site-footer .ttk-footer-bottom {
    border-top-color: rgba(255,255,255,0.12);
}

.ttk-footer-newsletter {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
    .site-footer .ttk-footer-bottom {
        justify-content: center !important;
        text-align: center;
    }
}


/* Mega menu, dropdown, offcanvas, footer widgets */
.site-header .menu-item-has-children,
.site-header .page_item_has_children {
    position: relative;
}

.site-header .sub-menu {
    min-width: 220px;
}

@media (min-width: 769px) {
    .site-header .menu-item-has-children > .sub-menu,
    .site-header .page_item_has_children > .children {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        display: none;
        z-index: 999;
    }

    .site-header .menu-item-has-children:hover > .sub-menu,
    .site-header .page_item_has_children:hover > .children {
        display: block;
    }
}

.ttk-offcanvas-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.ttk-footer-widget-area {
    max-width: 1200px;
    margin: 28px auto 0;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255,255,255,0.06);
}

.ttk-footer-widget-head {
    margin-bottom: 16px;
}

.ttk-footer-widget-title {
    margin: 0 0 8px;
}

.ttk-footer-widget-intro {
    margin: 0;
    opacity: 0.9;
}

.ttk-footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px;
}

.ttk-footer-widget-col .widget {
    margin: 0;
}

.ttk-footer-widget-col .widget-title {
    margin-top: 0;
}

@media (max-width: 768px) {
    .ttk-offcanvas-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .ttk-footer-widgets {
        grid-template-columns: 1fr;
    }
}


/* Final polished premium controls */
.site-header .ttk-primary-nav,
.site-header .main-navigation {
    position: relative;
}

.site-header .sub-menu,
.site-header .children {
    list-style: none;
}

.site-header .sub-menu li,
.site-header .children li {
    margin: 0;
}

.site-header .sub-menu a,
.site-header .children a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
}

.site-header .sub-menu a:hover,
.site-header .children a:hover {
    background: rgba(0,0,0,0.05);
}

.ttk-mobile-menu-toggle {
    border-radius: 12px;
}

.ttk-mobile-menu-toggle:hover,
.ttk-mobile-menu-toggle:focus-visible {
    background: rgba(0,0,0,0.06);
}

.ttk-offcanvas-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.ttk-offcanvas-close:hover,
.ttk-offcanvas-close:focus-visible {
    background: rgba(0,0,0,0.06);
}

#ttk-mobile-nav .ttk-submenu-toggle {
    display: none;
}

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

.ttk-footer-widget-col .widget li + li {
    margin-top: 8px;
}

.ttk-footer-copy-wrap {
    display: flex;
    align-items: center;
}

@media (max-width: 1024px) {
    #ttk-mobile-nav .menu-item-has-children,
    #ttk-mobile-nav .page_item_has_children {
        position: relative;
    }

    #ttk-mobile-nav .ttk-submenu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border: 0;
        background: rgba(0,0,0,0.06);
        border-radius: 10px;
        margin: 8px 0;
        cursor: pointer;
    }

    #ttk-mobile-nav .ttk-submenu-toggle span::before {
        content: '+';
        font-size: 18px;
        line-height: 1;
    }

    #ttk-mobile-nav .menu-item-has-children.is-open > .ttk-submenu-toggle span::before,
    #ttk-mobile-nav .page_item_has_children.is-open > .ttk-submenu-toggle span::before {
        content: '−';
    }

    #ttk-mobile-nav .sub-menu,
    #ttk-mobile-nav .children {
        width: 100%;
        padding-top: 6px;
    }
}


/* Hard stable header/footer */
.ttk-stable-header {
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.ttk-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.main-navigation .nav-menu,
.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-navigation a {
    text-decoration: none;
}
.ttk-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ttk-inline-search .ttk-search-field {
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 10px;
    min-width: 200px;
}
.ttk-header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(0,0,0,0.08);
}
.ttk-stable-footer {
    padding: 40px 20px 20px;
}
.ttk-stable-footer .ttk-footer-inner,
.ttk-stable-footer .ttk-footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
}
.ttk-stable-footer .ttk-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.ttk-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ttk-footer-menu li + li {
    margin-top: 8px;
}
.ttk-stable-footer .ttk-footer-bottom {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.16);
}
@media (max-width: 768px) {
    .ttk-header-inner,
    .ttk-stable-footer .ttk-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .main-navigation .nav-menu,
    .main-navigation ul,
    .ttk-header-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    .ttk-inline-search .ttk-search-field {
        min-width: 0;
        width: 100%;
    }
}
