/*
Theme Name: Hamastudy Blanding
Theme URI: https://blanding.kr
Author: 비랜딩 (blanding.kr)
Author URI: https://blanding.kr
Description: 비랜딩에서 제작한 빠른 속도가 강점인 테마입니다
Version: 2.0.10
Text Domain: blanding-base
*/

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

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

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
}

body:has(.custom-footer) .site-footer:not(.custom-footer) {
    display: none;
}

.custom-footer {
    display: block !important;
    clear: both;
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    z-index: 1000;
}

.site-header a,
.site-header button {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.header-container {
    width: min(100% - 40px, 1200px);
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo-area {
    flex: 0 0 auto;
}

.site-title,
.custom-logo-link {
    display: inline-flex;
    align-items: center;
    color: #111827;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.site-title:hover,
.custom-logo-link:hover {
    color: #111827;
    text-decoration: none;
}

.custom-logo {
    display: block;
    width: auto;
    max-height: 48px;
}

.site-logo-fallback {
    line-height: 0;
}

.site-logo-image {
    display: block;
    width: auto;
    height: 44px;
    max-width: 190px;
    object-fit: contain;
}

/*
 * WooCommerce adds `.woocommerce-page img { height: auto; }` on account pages.
 * Keep the global header geometry independent from page/plugin image rules.
 */
.site-header .logo-area,
.site-header .site-title,
.site-header .custom-logo-link,
.site-header .site-logo-fallback {
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 190px !important;
}

.site-header .logo-area img,
.site-header img.custom-logo,
.site-header img.site-logo-image {
    display: block !important;
    width: auto !important;
    height: 44px !important;
    max-width: 190px !important;
    max-height: 44px !important;
    object-fit: contain !important;
}

.header-menu-panel {
    display: flex;
    min-width: 0;
    margin-left: auto;
    align-items: center;
    gap: 28px;
}

.main-navigation {
    min-width: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    position: relative;
    list-style: none;
}

.nav-menu a {
    display: block;
    color: #1f2937;
    font-size: 15px;
    font-weight: 600 !important;
    line-height: 1.4;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: #ff00a8;
    text-decoration: none;
}

.nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    z-index: 1001;
    min-width: 180px;
    margin: 0;
    padding: 10px;
    list-style: none;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.nav-menu .sub-menu::before {
    content: "";
    position: absolute;
    top: -17px;
    left: 0;
    right: 0;
    height: 17px;
}

.nav-menu .sub-menu a {
    padding: 9px 12px;
    border-radius: 8px;
}

.nav-menu .sub-menu a:hover,
.nav-menu .sub-menu a:focus {
    background: #f9fafb;
}

.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.header-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 12px;
    padding-left: 4px;
}

.header-actions a {
    color: #1f2937;
    font-size: 14px;
    font-weight: 700 !important;
    line-height: 1;
    white-space: nowrap;
}

.header-actions a:hover {
    color: #fe00c3;
    text-decoration: none;
}

.header-register-link {
    padding: 10px 16px;
    color: #fff !important;
    background: #fe00c3;
    border-radius: 999px;
}

.header-register-link:hover {
    color: #fff !important;
    background: #d500a4;
}

.elementor-page-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.elementor-page-main > article,
.elementor-page-main .entry-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Keep the data-room subhero aligned with the site's standard subpage hero. */
#data-room-hero {
    height: 810px !important;
    min-height: 810px !important;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.menu-toggle-line {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: #111827;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 980px) {
    .header-container {
        width: min(100% - 32px, 1200px);
        min-height: 68px;
    }

    .menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .header-menu-panel {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: block;
        margin-left: 0;
        max-height: 0;
        overflow: hidden;
        background: #fff;
        border-bottom: 1px solid transparent;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0.2s ease;
    }

    .main-navigation {
        position: static;
    }

    .site-header.menu-open .header-menu-panel {
        max-height: calc(100vh - 68px);
        overflow-y: auto;
        border-bottom-color: #e5e7eb;
        opacity: 1;
        visibility: visible;
    }

    .header-actions {
        width: min(100% - 32px, 1200px);
        margin: 0 auto;
        justify-content: flex-start;
        gap: 10px;
        padding: 14px 4px 20px;
        border-top: 1px solid #e5e7eb;
    }

    .nav-menu {
        display: block;
        width: min(100% - 32px, 1200px);
        margin: 0 auto;
        padding: 10px 0 0;
    }

    .nav-menu > li {
        border-bottom: 1px solid #f1f5f9;
    }

    .nav-menu > li > a {
        padding: 14px 4px;
        font-size: 16px;
    }

    .nav-menu .sub-menu {
        position: static;
        min-width: 0;
        padding: 0 0 10px 14px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-menu .sub-menu::before {
        display: none;
    }

    .nav-menu .sub-menu a {
        padding: 10px 12px;
        color: #64748b;
        font-size: 14px;
    }

    html.mobile-menu-open,
    html.mobile-menu-open body {
        overflow: hidden;
    }

    .site-header.menu-open .menu-toggle-line:nth-of-type(2) {
        transform: translateY(7px) rotate(45deg);
    }

    .site-header.menu-open .menu-toggle-line:nth-of-type(3) {
        opacity: 0;
    }

    .site-header.menu-open .menu-toggle-line:nth-of-type(4) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    #data-room-hero {
        height: 600px !important;
        min-height: 600px !important;
    }
}

@media (max-width: 480px) {
    .header-container {
        width: calc(100% - 24px);
    }

    .site-title {
        font-size: 18px;
    }

    .site-logo-image {
        height: 38px;
        max-width: 150px;
    }

    .site-header .logo-area,
    .site-header .site-title,
    .site-header .custom-logo-link,
    .site-header .site-logo-fallback {
        max-width: 150px !important;
    }

    .site-header .logo-area img,
    .site-header img.custom-logo,
    .site-header img.site-logo-image {
        height: 38px !important;
        max-width: 150px !important;
        max-height: 38px !important;
    }

    body {
        font-size: 15px;
        line-height: 1.65;
    }

    .entry-content h1,
    .elementor-widget-heading h1.elementor-heading-title {
        font-size: clamp(30px, 9vw, 40px);
        line-height: 1.2;
        word-break: keep-all;
    }

    .entry-content h2,
    .elementor-widget-heading h2.elementor-heading-title {
        font-size: clamp(25px, 7vw, 32px);
        line-height: 1.28;
        word-break: keep-all;
    }

    .entry-content p,
    .entry-content li {
        word-break: keep-all;
    }
}

/* Logged-in student tools embedded in the data room. */
.hamastudy-tool-shell {
    margin: 24px 0;
}

.hamastudy-tool-frame {
    display: block;
    width: 100%;
    min-height: 760px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
}

.hamastudy-tool-fallback {
    margin-top: 12px;
    color: #64748b;
    font-size: 14px;
}

.hamastudy-tool-button,
.hamastudy-tool-login {
    display: inline-flex;
    min-height: 44px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fe00c3;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
}

.hamastudy-tool-locked {
    padding: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f8fafc;
    text-align: center;
}

.hamastudy-tool-locked p {
    margin: 0 0 16px;
}

@media (max-width: 768px) {
    .hamastudy-tool-frame {
        min-height: 680px;
        border-radius: 12px;
    }
}

/* Standard username/password login displayed below the Kakao quick login. */
.hamastudy-standard-login {
    width: 100%;
}

.hamastudy-standard-login .hippo-or-divider span {
    white-space: nowrap;
}

.hamastudy-standard-login form {
    width: 100%;
    margin: 0;
}

.hamastudy-standard-login form > p {
    margin: 0 0 16px;
}

.hamastudy-standard-login label {
    display: block;
    margin-bottom: 7px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.hamastudy-standard-login input[type="text"],
.hamastudy-standard-login input[type="password"] {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #f9f9f9;
    color: #222;
    font: inherit;
    box-sizing: border-box;
}

.hamastudy-standard-login input[type="text"]:focus,
.hamastudy-standard-login input[type="password"]:focus {
    outline: none;
    border-color: #e5007f;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(229, 0, 127, 0.1);
}

.hamastudy-standard-login .login-remember label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.hamastudy-standard-login .login-remember input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #e5007f;
}

.hamastudy-standard-login .login-submit {
    margin-bottom: 0;
}

.hamastudy-standard-login .button-primary {
    width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    border: 0;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.hamastudy-standard-login .button-primary:hover,
.hamastudy-standard-login .button-primary:focus {
    background: #e5007f;
}

.hamastudy-login-help {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
}

.hamastudy-login-help a {
    color: #666;
    text-decoration: none;
}

.hamastudy-login-help a:hover {
    color: #e5007f;
}

.hamastudy-login-fallback {
    padding: 40px 20px;
}
