/*
Theme Name: Netliteracy
Theme URI: https://netliteracy.jp
Description: 小・中・高校生のためのネットリテラシー教育サイトのテーマ
Version: 1.1
Author: Netliteracy Team
Author URI: https://netliteracy.jp
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: netliteracy
*/

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

:root {
    --primary-orange: #FF9500;
    --primary-blue: #0066CC;
    --primary-green: #00A86B;
    --bg-cream: #FFF9F0;
    --bg-light: #FFFFFF;
    --text-dark: #333333;
    --text-gray: #666666;
    --accent-red: #FF3B30;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-dark);
    background: var(--bg-cream);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header - レスポンシブ対応
   ======================================== */

header.site-header {
    background: var(--bg-light);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

/* ヘッダーのラッパー */
.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ロゴ */
.logo {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-decoration: none;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-link svg {
    vertical-align: middle;
    display: block;
}

/* PC版ナビゲーション */
.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 出前教室ボタン */
.cta-nav {
    background: var(--primary-blue);
    color: white !important;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
}

.cta-nav::after {
    display: none;
}

.cta-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

/* ハンバーガーボタン（デフォルトは非表示） */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 35px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger span {
    width: 35px;
    height: 4px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

/* ハンバーガーボタンがアクティブ時（×になる） */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* オーバーレイ */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

#menu-overlay.active {
    display: block;
}

/* Hero Section */
.hero {
    padding: 80px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 149, 0, 0.15), transparent);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.15), transparent);
    border-radius: 50%;
    animation: float 25s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero .subtitle {
    font-size: 24px;
    color: var(--text-gray);
    margin-bottom: 15px;
    font-weight: 500;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero .description {
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.btn {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-blue));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-3px);
}

/* Grade Cards Section */
.grade-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-title {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 42px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 60px;
}

.grade-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.grade-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.grade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    transition: height 0.4s ease;
}

.grade-card.elementary::before {
    background: var(--primary-orange);
}

.grade-card.junior::before {
    background: var(--primary-blue);
}

.grade-card.high::before {
    background: var(--primary-green);
}

.grade-card:hover::before {
    height: 100%;
    opacity: 0.05;
}

.grade-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.grade-icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
}

.grade-card h3 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.grade-card.elementary h3 {
    color: var(--primary-orange);
}

.grade-card.junior h3 {
    color: var(--primary-blue);
}

.grade-card.high h3 {
    color: var(--primary-green);
}

.grade-card p {
    color: var(--text-gray);
    line-height: 1.8;
}

.parent-teacher-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.parent-teacher-card {
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.parent-teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.parent-teacher-card h4 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

/* Popular Content Section */
.popular-section {
    padding: 80px 0;
    background: var(--bg-cream);
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.popular-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.popular-item:nth-child(1) {
    border-left-color: var(--primary-orange);
}

.popular-item:nth-child(2) {
    border-left-color: var(--primary-blue);
}

.popular-item:nth-child(3) {
    border-left-color: var(--primary-green);
}

.popular-item:nth-child(4) {
    border-left-color: var(--accent-red);
}

.popular-item:nth-child(5) {
    border-left-color: var(--primary-orange);
}

.popular-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.popular-item h4 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.popular-item p {
    color: var(--text-gray);
    font-size: 14px;
}

/* Interactive Tools */
.tools-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tool-card {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    color: white;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card:nth-child(2) {
    background: linear-gradient(135deg, #F093FB 0%, #F5576C 100%);
}

.tool-card:nth-child(3) {
    background: linear-gradient(135deg, #4FACFE 0%, #00F2FE 100%);
}

.tool-card:nth-child(4) {
    background: linear-gradient(135deg, #43E97B 0%, #38F9D7 100%);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
    transition: transform 0.6s ease;
}

.tool-card:hover::before {
    transform: translate(-25%, -25%);
}

.tool-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.tool-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.tool-card h4 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 500;
}

.btn-white {
    background: white;
    color: var(--primary-blue);
    padding: 18px 50px;
    font-size: 20px;
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
    background: var(--bg-cream);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    animation: fadeInUp 0.8s ease-out both;
}

.stat-number {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 56px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 18px;
    color: var(--text-gray);
    font-weight: 500;
}

/* Footer */
footer.site-footer {
    background: #2C3E50;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h5 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* WordPress Content Styles */
.content-area {
    padding: 80px 0;
}

.entry-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.entry-title {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content h2 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--primary-blue);
}

.entry-content h3 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 30px 0 15px;
    color: var(--text-dark);
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.2s;
}

.fade-in-delay-2 {
    animation-delay: 0.4s;
}

.fade-in-delay-3 {
    animation-delay: 0.6s;
}

/* ========================================
   レスポンシブデザイン - モバイル対応
   ======================================== */

/* タブレット以下（768px以下） */
@media (max-width: 768px) {
    /* ハンバーガーボタンを表示 */
    .hamburger {
        display: flex !important;
    }
    
    /* ロゴを小さく */
    .logo-link svg {
        width: 200px !important;
        height: auto !important;
    }
    
    /* メニューを右側から表示 */
    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        background: white !important;
        flex-direction: column !important;
        padding: 80px 20px 20px !important;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1) !important;
        transition: right 0.3s ease !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        gap: 0 !important;
    }
    
    /* メニューがアクティブ時 */
    .nav-links.active {
        right: 0 !important;
    }
    
    /* メニュー項目を縦並び */
    .nav-links li {
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
        width: 100% !important;
    }
    
    .nav-links li:last-child {
        border-bottom: none !important;
    }
    
    .nav-links li a {
        display: block !important;
        padding: 15px 10px !important;
        font-size: 16px !important;
        color: #333 !important;
        text-decoration: none !important;
    }
    
    .nav-links li a::after {
        display: none !important;
    }
    
    .nav-links li a:hover {
        background: #f5f5f5 !important;
        border-radius: 8px !important;
    }
    
    /* 出前教室ボタン */
    .nav-links li a.cta-nav {
        background: linear-gradient(135deg, #FF9500, #0066CC) !important;
        color: white !important;
        text-align: center !important;
        padding: 15px 20px !important;
        border-radius: 30px !important;
        margin: 10px !important;
    }
    
    .nav-links li a.cta-nav:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3) !important;
    }

    /* その他のモバイル調整 */
    .hero h1 {
        font-size: 36px;
    }

    .hero .subtitle {
        font-size: 18px;
    }

    .hero .description {
        font-size: 16px;
    }

    .section-title {
        font-size: 32px;
    }

    .grade-cards {
        grid-template-columns: 1fr;
    }

    .cta-section h2 {
        font-size: 32px;
    }

    .cta-features {
        flex-direction: column;
        gap: 15px;
    }
}

/* スマホ（480px以下）のさらなる調整 */
@media (max-width: 480px) {
    .logo-link svg {
        width: 180px !important;
    }
    
    .nav-links {
        width: 250px !important;
    }
}