/* ==========================================
   株式会社ナカゾノ - レスポンシブスタイル
   ========================================== */

/* タブレット対応 (768px - 991px) */
@media (max-width: 991px) {
    /* ヘッダー */
    .header-contact {
        display: none !important;
    }
    
    .navbar-nav {
        background: white;
        padding: 20px;
        margin-top: 20px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 10px 15px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* ヒーローセクション */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    /* セクションタイトル */
    .section-title {
        font-size: 2rem;
    }
    
    /* 会社の強み */
    .strength-card {
        margin-bottom: 30px;
    }
    
    /* 事業内容 */
    .service-card {
        margin-bottom: 30px;
    }
    
    /* 代表挨拶・企業理念 */
    .message-box {
        margin-bottom: 30px;
    }
    
    /* お問い合わせ */
    .contact-tel a {
        padding: 15px 30px;
        font-size: 1.5rem;
    }
}

/* スマートフォン対応 (576px - 767px) */
@media (max-width: 767px) {
    /* 基本設定 */
    section {
        padding: 60px 0;
    }
    
    /* ヘッダー */
    .logo-text {
        font-size: 1.5rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 4px 12px;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    /* ヒーローセクション */
    .hero-section {
        height: 80vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 0;
        line-height: 1.3;
    }
    
    .hero-title::after {
        content: "創業70年\A確かな技術と信頼";
        white-space: pre-line;
        display: block;
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0;
        line-height: 1.6;
    }
    
    .hero-subtitle::after {
        content: "地域と共に歩み続けて半世紀以上\A確かな実績でお応えいたします";
        white-space: pre-line;
        display: block;
        font-size: 1rem;
    }
    
    .hero-subtitle br {
        display: none;
    }
    
    /* セクション共通 */
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: 1.8rem;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    /* 会社の強み */
    .strength-card {
        padding: 30px 20px;
    }
    
    .strength-icon {
        width: 60px;
        height: 60px;
    }
    
    .strength-icon i {
        font-size: 1.5rem;
    }
    
    .strength-card h3 {
        font-size: 1.1rem;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    /* 事業内容 */
    .service-card {
        padding: 0;
    }

    .service-image {
        height: 180px;
    }

    .service-content {
        padding: 25px 20px 20px;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        bottom: 15px;
    }

    .service-icon i {
        font-size: 1.6rem;
    }

    .service-card h3 {
        font-size: 1.1rem;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    /* 施工実績 */
    .work-item {
        margin-bottom: 30px;
    }
    
    .work-item img {
        height: 250px;
    }
    
    .work-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 51, 102, 0.95), rgba(0, 51, 102, 0.7));
    }
    
    /* 代表挨拶 - モバイル専用スタイル */
    .president-message {
        padding: 60px 0;
    }
    
    .president-title {
        font-size: 1.4rem !important;
        letter-spacing: 0.1em !important;
        margin-bottom: 1rem;
        word-break: keep-all;
        overflow-wrap: break-word;
        font-family: 'Bebas Neue', 'Anton', 'Oswald', 'Arial Black', sans-serif !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }
    
    .president-message-box {
        padding: 25px 15px !important;
        margin: 0 10px;
    }
    
    .president-quote {
        font-size: 0.8rem !important;
        line-height: 1.8 !important;
        padding-left: 15px !important;
        border-left-width: 3px !important;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    .president-quote .lead {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
        font-weight: 600 !important;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    .president-quote p {
        margin-bottom: 1rem !important;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    .president-signature {
        margin-top: 1.5rem !important;
    }
    
    .signature-line {
        width: 100px !important;
        height: 2px !important;
        margin-bottom: 0.8rem !important;
    }
    
    .president-name {
        font-size: 1.2rem !important;
        letter-spacing: 0.1em !important;
        line-height: 1.3 !important;
        word-break: keep-all;
        overflow-wrap: break-word;
        font-family: 'Bebas Neue', 'Anton', 'Oswald', 'Arial Black', sans-serif !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }
    
    .president-position {
        font-size: 0.75rem !important;
        letter-spacing: 0.05em !important;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    .philosophy-item {
        padding: 15px;
    }
    
    .philosophy-item h4 {
        font-size: 1.1rem;
    }
    
    /* 会社概要 */
    .company-info table {
        font-size: 0.9rem;
    }
    
    .company-info th,
    .company-info td {
        padding: 12px 15px;
        display: block;
        width: 100%;
    }
    
    .company-info th {
        background: var(--main-color);
        color: white;
        text-align: left;
    }
    
    .company-info td {
        background: white;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 1px;
    }
    
    .company-info tr {
        display: block;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
    
    /* アクセス */
    .access-info {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .access-info h3 {
        font-size: 1.3rem;
    }
    
    .address,
    .tel,
    .fax {
        font-size: 1rem;
    }
    
    .map-container iframe {
        height: 300px;
    }
    
    /* お問い合わせ */
    .contact-message {
        font-size: 1.1rem;
    }
    
    .contact-tel a {
        padding: 15px 25px;
        font-size: 1.3rem;
    }
    
    .contact-tel i {
        font-size: 1.2rem;
    }
    
    .tel-text {
        display: none;
    }
    
    .business-hours {
        padding: 20px;
    }
    
    .business-hours .hours {
        font-size: 1.1rem;
    }
    
    /* フッター */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-title {
        font-size: 1.3rem;
    }
    
    .footer-subtitle {
        font-size: 1.1rem;
    }
    
    .footer-nav a {
        font-size: 0.9rem;
    }
    
    /* トップへ戻るボタン */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* 小型スマートフォン対応 (480px以下) */
@media (max-width: 480px) {
    /* ヘッダー */
    .logo-text {
        font-size: 1.3rem;
    }
    
    /* ヒーローセクション */
    .hero-section {
        height: 70vh;
        min-height: 450px;
    }
    
    .hero-title {
        font-size: 0;
    }
    
    .hero-title::after {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0;
    }
    
    .hero-subtitle::after {
        font-size: 0.9rem;
    }
    
    /* セクション */
    section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* 会社の強み・事業内容 */
    .strength-card {
        padding: 25px 15px;
    }

    .service-card {
        padding: 0;
    }

    .service-image {
        height: 160px;
    }

    .service-content {
        padding: 20px 15px 18px;
    }

    .service-icon {
        width: 55px;
        height: 55px;
        bottom: 12px;
    }

    .service-icon i {
        font-size: 1.4rem;
    }

    .strength-card h3 {
        font-size: 1rem;
        word-break: keep-all;
        overflow-wrap: break-word;
    }

    .service-card h3 {
        font-size: 1rem;
        word-break: keep-all;
        overflow-wrap: break-word;
    }

    .strength-card p {
        font-size: 0.85rem;
        word-break: keep-all;
        overflow-wrap: break-word;
    }

    .service-card p {
        font-size: 0.85rem;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    /* 代表挨拶 - 小型スマホ追加調整 */
    .president-title {
        font-size: 1.2rem !important;
        font-family: 'Bebas Neue', 'Anton', 'Oswald', 'Arial Black', sans-serif !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }
    
    .president-message-box {
        padding: 20px 12px !important;
        margin: 0 5px;
    }
    
    .president-quote {
        font-size: 0.75rem !important;
        padding-left: 12px !important;
    }
    
    .president-quote .lead {
        font-size: 0.85rem !important;
    }
    
    .president-name {
        font-size: 1rem !important;
        font-family: 'Bebas Neue', 'Anton', 'Oswald', 'Arial Black', sans-serif !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }
    
    .president-position {
        font-size: 0.7rem !important;
    }
    
    /* 施工実績 */
    .work-item img {
        height: 200px;
    }
    
    .work-overlay h4 {
        font-size: 1rem;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    .work-overlay p {
        font-size: 0.85rem;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    /* お問い合わせ */
    .contact-tel a {
        padding: 12px 20px;
        font-size: 1.1rem;
    }
    
    .tel-number {
        font-size: 1rem;
    }
    
    /* フッター */
    .footer {
        text-align: center;
    }
    
    .footer p {
        font-size: 0.85rem;
    }
    
    .copyright {
        font-size: 0.8rem;
    }
}

/* 横向き対応 */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* プリント対応 */
@media print {
    /* ヘッダー固定解除 */
    #header {
        position: relative;
    }
    
    /* 不要な要素を非表示 */
    .scroll-indicator,
    .back-to-top,
    .navbar-toggler {
        display: none !important;
    }
    
    /* 背景色を白に */
    body,
    .bg-light,
    .contact-section {
        background: white !important;
        color: black !important;
    }
    
    /* リンクの色を黒に */
    a {
        color: black !important;
        text-decoration: none;
    }
    
    /* 影を削除 */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* ページブレイク設定 */
    section {
        page-break-inside: avoid;
    }
    
    h2, h3 {
        page-break-after: avoid;
    }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ダークモード対応（ユーザー設定に応じて） */
@media (prefers-color-scheme: dark) {
    /* 必要に応じてダークモード用のスタイルを追加 */
}