@charset "UTF-8";
/*
Theme Name: Axenor Theme
Theme URI: https://example.com/
Description: 会員限定教材サイト用オリジナルテーマ。管理者負担を軽減する設計。
Version: 1.0.0
Author: DeepMind
Author URI: https://example.com/
Text Domain: axenor-theme
*/

:root {
    --color-primary: #27AE60;    /* 緑（アイコンに合わせて変更） */
    --color-accent: #FF6B6B;     /* 動画用アクセント（赤系） */
    --color-bg: #FFFFFF;         /* 背景色 */
    --color-text: #333333;       /* メインテキスト */
    --color-white: #FFFFFF;
    --radius-md: 12px;
    --radius-lg: 20px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --shadow-card: 0 4px 12px rgba(0,0,0,0.05);
}

/* Reset & Base */
* { box-sizing: border-box; }
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    line-height: 1.6;
    /* 背景画像設定（ログイン時のみ適用されるよう、後で調整も可能だが一旦全体に） */
    background-image: url('assets/images/background.jpeg');
    background-size: cover; /* または contain, auto など好みで */
    background-position: center;
    background-attachment: fixed; /* スクロールしても背景固定 */
    background-repeat: no-repeat;
    /* Sticky Footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; transition: opacity 0.3s; }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; }

.site-main {
    flex: 1;
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.main-content-wrapper {
    background-color: #ffffff; /* 完全不透明に変更 */
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1); /* シャドウを強化して浮き上がらせる */
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid rgba(0,0,0,0.05); /* 境界線を少し追加 */
}
.header-inner, .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
}

/* Header */
.site-header {
    background: var(--color-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo img { height: 50px; }
.btn-logout {
    background: var(--color-text);
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
}
.btn-terms {
    color: var(--color-primary);
    background: transparent;
    border: 2px solid var(--color-primary);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}
.btn-terms:hover {
    background: var(--color-primary);
    color: var(--color-white);
    opacity: 1;
}

/* Footer */
.site-footer {
    background: var(--color-white);
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg) 0;
    text-align: center;
    font-size: 14px;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}
.footer-btn {
    display: inline-block;
    background: var(--color-bg);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    color: var(--color-primary);
    font-weight: bold;
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--spacing-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    color: white;
    font-size: 14px;
    border: none;
    cursor: pointer;
}
.btn-primary { background-color: var(--color-primary); }
.btn-accent { background-color: var(--color-accent); }
.btn-secondary { background-color: #A0AEC0; }
.btn-block { display: flex; width: 100%; justify-content: center; margin-top: var(--spacing-sm); }

/* Tabs */
.tab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
    padding-bottom: 5px;
}
.tab-btn {
    background: var(--color-white);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: bold;
}
.tab-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Side Decoration Removed */

/* Material List Item */
.material-item {
    display: flex;
    align-items: flex-start;
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-md);
    border-left: 5px solid var(--color-primary);
    position: relative; /* For stretched link */
    transition: transform 0.2s, box-shadow 0.2s;
}
.material-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Stretched Link for Card Click */
.material-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Lowest clickable layer */
    border-radius: var(--radius-md);
}

.material-thumb {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
    flex-shrink: 0;
}
.material-info {
    flex: 1;
}
.material-info h3 { margin: 0 0 5px; font-size: 18px; color: var(--color-text); }
.material-meta { font-size: 12px; color: #777; }

/* Buttons Area */
.material-actions { 
    display: flex; 
    gap: 10px; 
    flex-shrink: 0; 
    align-items: center; 
    position: relative;
    z-index: 2; /* Sit above the card link */
}

/* Icon Only Button (List) */
.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #fff;
    border: none;
    cursor: pointer;
}
.btn-dl { background-color: #4A90E2; }
.btn-dl:hover { background-color: #357ABD; transform: scale(1.1); }
.btn-video { background-color: #E53E3E; }
.btn-video:hover { background-color: #C53030; transform: scale(1.1); }

/* Large Icon Button (Single Page) */
/* Monochrome Icon Button (Single Page) */
.btn-mono-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    transition: opacity 0.2s, transform 0.2s;
    min-width: 80px; /* Ensure clickable area */
}
.btn-mono-icon:hover {
    opacity: 0.7;
    transform: translateY(-2px);
}

/* Small Variant for Archive List */
.btn-mono-icon-sm {
    min-width: 60px;
}
.btn-mono-icon-sm .icon-circle svg {
    width: 24px;
    height: 24px;
}
.btn-mono-icon-sm .btn-text {
    font-size: 10px;
    line-height: 1.2;
}
.btn-mono-icon-sm .btn-text span {
    display: block;
}

.icon-circle {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-circle svg {
    width: 48px;
    height: 48px;
}
.btn-text {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

/* Responsive */
@media (max-width: 900px) {
    /* 画面が狭くなったらサイド装飾を非表示 */
    .site-decoration-left,
    .site-decoration-right {
        display: none;
    }
}

@media (max-width: 600px) {
    .material-item { flex-direction: column; align-items: flex-start; }
    .material-thumb { width: 100%; height: 150px; margin-bottom: 10px; }
    .material-actions { width: 100%; flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
}

/* Login Page Override */
.login-page-wrapper {
    max-width: 400px;
    margin: 100px auto;
    text-align: center;
}

/* -------------------------
   Mobile Optimization
------------------------- */

/* Desktop: Hide Mobile Slider */
.mobile-only-slider {
    display: none;
}

@media (max-width: 768px) {
    /* Layout Adjustments */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .main-content-wrapper {
        padding: var(--spacing-md);
        margin-top: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }

    /* Header Adjustments */
    .header-inner {
        flex-direction: column;
        gap: 10px;
    }
    .header-nav {
        width: 100%;
        justify-content: flex-end;
    }

    /* Slider Styles (Mobile Only) */
    .mobile-only-slider {
        display: block;
        margin-bottom: 20px;
    }
    .slider-heading {
        font-size: 18px;
        margin-bottom: 10px;
        border-bottom: 2px solid var(--color-primary);
        padding-bottom: 5px;
        display: inline-block;
    }
    .slider-track {
        display: flex;
        gap: 15px;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    .slider-item {
        flex: 0 0 160px; /* Width of each card */
        scroll-snap-align: start;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        overflow: hidden;
    }
    .slider-link {
        display: block;
        text-decoration: none;
        color: inherit;
    }
    .slider-thumb {
        width: 100%;
        height: 100px;
        object-fit: cover;
    }
    .slider-thumb-placeholder {
        width: 100%;
        height: 100px;
        background: #eee;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #999;
        font-size: 12px;
    }
    .slider-title {
        font-size: 13px;
        font-weight: bold;
        padding: 8px;
        margin: 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* List View: Hide Thumbnails on Mobile */
    .material-item .material-thumb {
        display: none;
    }
    .material-item {
        padding: 12px;
    }
    .material-info h3 {
        font-size: 16px;
    }
    .material-actions {
        flex-direction: row;
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid #f0f0f0;
        margin-top: 10px;
        padding-top: 10px;
    }
    .material-actions .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}
