/* ===================================
   Responsive Styles for 就是愛美食 Website
   =================================== */

/* Large Screens */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    /* Hero Section */
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-brand {
        font-size: 4rem;
    }
}

/* Medium Screens */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
        padding: 0 25px;
    }
    
    /* Header Adjustments */
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-info {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .contact-info li {
        font-size: 11px;
    }
    
    /* Navigation */
    .desktop-menu {
        display: none;
    }
    
    .mobile-menu-trigger {
        display: block;
    }
    
    .sub-menu {
        min-width: 280px;
        left: 0;
        transform: translateX(0) translateY(10px);
        border-radius: 8px;
        padding: 10px 0;
        display: block;
        width: auto;
    }

    /* 手機版分類選單樣式 - 已簡化為純文字清單 */
    
    .sub-menu li {
        min-width: auto;
        margin: 0;
    }
    
    .sub-menu li a {
        text-align: left;
        border-bottom: 1px solid #f5f5f5;
        border-radius: 0;
        padding: 12px 20px;
        font-size: 14px;
        border-left: none;
    }
    
    .sub-menu li a:hover {
        transform: translateX(5px);
        background-color: #f8f9fa;
        border-left-color: #8B4513;
    }
    
    .sub-menu li:last-child a {
        border-bottom: none;
    }
    
    /* Hero Section */
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-brand {
        font-size: 3.5rem;
    }
    
    .hero-content .description {
        font-size: 1.1rem;
    }
    
    /* Grid Adjustments */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }
    
    .category-emoji {
        font-size: 2rem;
    }
    
    /* Footer */
    .footer-sections {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    /* Footer 橫向聯絡資訊 */
    .contact-info-horizontal {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact-item-horizontal {
        justify-content: flex-start;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    

}

/* Small Screens */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    /* Header */
    .top-bar {
        padding: 3px 0; /* 進一步減少手機版 padding */
    }
    
    .main-nav {
        padding: 6px 0; /* 進一步減少手機版 padding */
    }
    
    .logo img {
        width: 100px; /* 調整手機版 logo 寬度 */
        height: auto;
        max-height: 40px;
    }
    
    /* 確保導航項目在手機版上不會被擋住 */
    .main-nav-menu > li > a {
        padding: 4px 6px; /* 進一步減少手機版 padding */
        font-size: 11px; /* 進一步減少手機版字體大小 */
    }
    
    /* Body - 移除 padding-top，因為 header 使用絕對定位 */
    body {
        padding-top: 0;
    }
    
    /* Hero Section - 調整手機版，讓 hero 從頂部開始 */
    .hero-section {
        height: 80vh;
        /* 移除 padding-top，讓 hero 從頂部開始 */
        margin-bottom: 0; /* 確保與下方內容緊貼 */
    }
    
    /* Content Section - 手機版調整 */
    .content-section {
        padding: 50px 0; /* 手機版減少 padding */
    }
    
    .content-section:first-of-type {
        padding-top: 50px; /* 手機版減少與 hero 的距離 */
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-brand {
        font-size: 3rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-content .description {
        font-size: 1rem;
        max-width: 400px;
    }
    
    /* CTA Button */
    .cta-button {
        padding: 15px 30px;
        font-size: 16px;
    }
    
    /* Content Sections */
    .content-section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    /* Grid Adjustments */
    .grid-4,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Menu Items */
    .menu-items {
        grid-template-columns: 1fr;
    }
    
    .menu-item-image {
        height: 200px;
    }
    
    .menu-item-content {
        padding: 20px;
    }
    
    /* Page Header - 調整 padding */
    .page-header {
        padding: 100px 0 40px 0; /* 調整手機版的 padding */
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    /* Contact Info */
    .contact-list .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 15px;
    }
    

    
    /* Menu Item Content */
    .menu-item-content {
        padding: 15px;
    }
    
    .menu-item-title {
        font-size: 1.1rem;
    }
    
    .menu-item-description {
        font-size: 0.9rem;
    }
}

/* Extra Small Screens */
@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    /* Hero Section */
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-brand {
        font-size: 2rem;
    }
    
    .hero-content .description {
        font-size: 0.85rem;
        max-width: 300px;
    }
    
    /* Section Spacing */
    .content-section {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    /* Contact Info in Footer */
    .contact-list .contact-item {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    /* Footer 橫向聯絡資訊小螢幕優化 */
    .contact-info-horizontal {
        gap: 15px;
    }
    
    .contact-icon {
        width: 35px;
        height: 35px;
    }
    
    .contact-icon i {
        font-size: 14px;
    }
    
    .contact-text .company-name {
        font-size: 14px;
    }
    
    .contact-text a {
        font-size: 13px;
    }
    
    /* Menu Item */
    .menu-item-content {
        padding: 12px;
    }
    
    .menu-item-title {
        font-size: 1.1rem;
    }
    
    .menu-item-description {
        font-size: 13px;
    }
    
    /* Header 手機版優化 */
    .contact-info {
        gap: 4px;
    }
    
    .contact-info li {
        font-size: 7px;
    }
    
    .social-icon {
        width: 18px;
        height: 18px;
        font-size: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .social-icon i {
        font-size: 7px;
        line-height: 1;
    }
    
    /* Footer 手機版優化 */
    #footer .container {
        padding: 0 20px;
    }
    
    .footer-sections {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .company-info {
        padding-right: 0;
        text-align: center;
        width: 100%;
    }
    
    .company-info .company-brand {
        text-align: center;
        width: 100%;
    }
    
    .company-info .company-description {
        text-align: center;
        width: 100%;
    }
    
    .company-info .social-icons {
        justify-content: center;
        width: 100%;
    }
    
    .quick-links {
        text-align: center;
        width: 100%;
    }
    
    .quick-links h3 {
        text-align: center;
        width: 100%;
    }
    
    .quick-links .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .quick-links .footer-links li {
        text-align: center;
        width: 100%;
    }
    
    .quick-links .footer-links a {
        text-align: center;
        width: 100%;
    }
    
    .contact-info {
        text-align: center;
        width: 100%;
    }
    
    .contact-info h3 {
        text-align: center;
        color: #FFD700;
        width: 100%;
    }
    
    .contact-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .contact-list .contact-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .contact-list .contact-details {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .contact-list .contact-label {
        text-align: center;
        margin-bottom: 5px;
        width: 100%;
    }
    
    .contact-list .contact-value {
        text-align: center;
        color: #fff !important;
        width: 100%;
    }
    
    .company-brand h4 {
        font-size: 1.6rem;
    }
    
    .company-description {
        font-size: 0.9rem;
    }
    
    .quick-links h3,
    .contact-info h3 {
        font-size: 1.1rem;
    }
    
    .footer-links li {
        margin-bottom: 8px;
    }
    
    .footer-links a {
        font-size: 0.9rem;
    }
    
    .contact-list .contact-item {
        margin-bottom: 6px;
    }
    
    .contact-list .contact-label {
        font-size: 0.75rem;
    }
    
    .contact-list .contact-value {
        font-size: 0.85rem;
    }
    
    /* Footer 社交媒體圖標手機版優化 */
    #footer .social-icons {
        justify-content: center;
        gap: 10px;
    }
    
    #footer .social-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* 超小螢幕優化 */
@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
    
    .top-bar {
        padding: 2px 0;
    }
    
    .main-nav {
        padding: 4px 0;
    }
    
    .contact-info {
        gap: 8px;
    }
    
    .contact-info li {
        font-size: 9px;
    }
    
    .social-icon {
        width: 22px;
        height: 22px;
        font-size: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .social-icon i {
        font-size: 9px;
        line-height: 1;
    }
    
    .hero-section {
        height: 70vh;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .hero-brand {
        font-size: 1.8rem;
    }
    
    .hero-content .subtitle {
        font-size: 0.9rem;
    }
    
    .hero-content .description {
        font-size: 0.8rem;
    }
    
    .cta-button {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .grid-4,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .category-emoji {
        font-size: 1.5rem;
    }
    
    .menu-items {
        grid-template-columns: 1fr;
    }
    
    .menu-item-image {
        height: 120px;
    }
    
    .page-header {
        padding: 25px 0;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .page-subtitle {
        font-size: 0.85rem;
    }
    
    /* Footer 超小螢幕優化 */
    .footer-sections {
        gap: 20px;
    }
    
    .company-brand h4 {
        font-size: 1.3rem;
        text-align: center;
        width: 100%;
    }
    
    .company-description {
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
    }
    
    .quick-links h3,
    .contact-info h3 {
        font-size: 0.95rem;
        text-align: center;
        width: 100%;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .footer-links li {
        text-align: center;
        width: 100%;
    }
    
    .footer-links a {
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
    }
    
    .contact-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .contact-list .contact-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .contact-list .contact-details {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .contact-list .contact-label {
        font-size: 0.65rem;
        text-align: center;
        width: 100%;
    }
    
    .contact-list .contact-value {
        font-size: 0.75rem;
        text-align: center;
        color: #fff !important;
        width: 100%;
    }
    
    /* Footer 社交媒體圖標超小螢幕優化 */
    #footer .social-icons {
        gap: 8px;
    }
    
    #footer .social-icon {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    /* Footer bottom 超小螢幕優化 */
    .footer-bottom {
        padding: 12px 0;
    }
    
    .footer-bottom .container {
        padding: 0 20px;
    }
    
    .footer-bottom-content {
        text-align: center;
    }
    
    .copyright p {
        font-size: 12px;
    }
}

/* Landscape Phone */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-brand {
        font-size: 2.2rem;
    }
    
    .hero-content .description {
        font-size: 0.9rem;
        margin: 1rem auto;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images and icons for retina displays */
    .logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print Styles */
@media print {
    * {
        color: black !important;
        background: white !important;
    }
    
    .top-bar,
    .mobile-menu-trigger,
    .mobile_menu_wrapper,
    #back-to-top,
    .social-icons,
    .social-links {
        display: none !important;
    }
    
    .hero-section {
        height: auto;
        padding: 40px 0;
        background: none !important;
    }
    
    .hero-content {
        color: black;
    }
    
    .content-section {
        padding: 20px 0;
    }
    
    #footer {
        background: none;
        color: black;
        border-top: 2px solid black;
        padding-top: 20px;
    }
    
    .footer-sections {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .footer-section {
        margin-bottom: 20px;
    }
    
    .company-logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .footer-logo {
        width: 40px;
    }
    
    .company-name h4 {
        font-size: 1.1rem;
    }
    
    .company-description {
        font-size: 0.85rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-link {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .footer-section h3 {
        color: black;
    }
    
    a::after {
        content: " (" attr(href) ")";
        font-size: 12px;
        color: #666;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-section {
        background-attachment: scroll;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* This would be implemented if dark mode is desired */
    /* For now, we'll keep the light theme as default */
}

/* ===================================
   Mobile Header Styles - 新設計
   =================================== */

/* 手機版Header樣式 */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(139, 69, 19, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.mobile-header-top {
    background: rgba(160, 82, 45, 0.9);
    padding: 8px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-contact-info .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 11px;
    line-height: 1.2;
}

.mobile-contact-info .contact-item i {
    font-size: 10px;
    width: 12px;
    text-align: center;
    color: #FFD700;
}

.mobile-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

.mobile-logo {
    flex: 1;
}

.logo-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crown-icon {
    font-size: 20px;
    color: #FFD700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.welcome-text {
    font-size: 10px;
    color: #FFD700;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.mobile-menu-toggle {
    margin-left: 15px;
}

.hamburger-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

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

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

/* 手機版選單覆蓋層 - 簡化版本 */
.mobile-menu-overlay {
    display: block !important;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6);
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu-content {
    right: 0;
}

/* 主要包裝器推移效果 */
#wrapper {
    transition: transform 0.3s ease;
    transform-origin: center center;
}

#wrapper.menu-pushed {
    transform: translateX(-30%) scale(0.85);
}

/* Mobile header 也要跟著推移 */
.mobile-header {
    transition: transform 0.3s ease;
    transform-origin: center center;
    z-index: 1000;
}

body.mobile-menu-open .mobile-header {
    transform: translateX(-30%) scale(0.85);
}

/* Scroll progress bar 也要跟著推移 */
.scroll-progress {
    transition: transform 0.3s ease;
}

body.mobile-menu-open .scroll-progress {
    transform: translateX(-30%) scale(0.85);
}

/* 回到頂部按鈕 */
.back-to-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(139, 69, 19, 0.8) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 9999 !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

.back-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.back-to-top:hover {
    background: rgba(139, 69, 19, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.back-to-top i {
    color: white;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-2px);
}

/* 手機版回到頂部按鈕 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top i {
        font-size: 18px;
    }
}

/* 選單開啟時隱藏回到頂部按鈕 */
body.mobile-menu-open .back-to-top {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* 防止選單開啟時的滾動 - 簡化版本 */
body.mobile-menu-open {
    overflow: hidden;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-logo .crown-icon {
    font-size: 24px;
}

.mobile-menu-logo .brand-name {
    font-size: 18px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.mobile-menu-nav {
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    min-height: 200px;
}

.mobile-menu-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 20px !important;
    display: block !important;
    visibility: visible !important;
}

.mobile-menu-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: block !important;
    margin-bottom: 8px;
}

.mobile-menu-list li:last-child {
    border-bottom: none;
}

.mobile-menu-list a {
    display: block !important;
    padding: 15px 20px !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.1) !important;
    margin-bottom: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-list a:hover,
.mobile-menu-list .current-menu-item a {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #FFD700 !important;
    transform: translateX(5px);
}

.mobile-menu-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #FFD700;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-menu-list a:hover::before,
.mobile-menu-list .current-menu-item a::before {
    transform: scaleY(1);
}

/* 手機版子選單 */
.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-submenu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-submenu li:last-child {
    border-bottom: none;
}

.mobile-submenu a {
    display: block;
    padding: 15px 20px 15px 40px;
    font-size: 14px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-submenu a::before {
    content: '•';
    position: absolute;
    left: 25px;
    color: #FFD700;
    font-size: 12px;
}

.mobile-submenu a:hover {
    color: #FFD700;
    background: rgba(139, 69, 19, 0.3);
    padding-left: 45px;
}

/* 手機版Hero Section背景 */
.mobile-hero-background {
    background-image: url('../images/ChatGPT Image 1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.mobile-hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(139, 69, 19, 0.7), 
        rgba(160, 82, 45, 0.6),
        rgba(0, 0, 0, 0.4));
    z-index: 1;
}

/* 手機版內容區域背景 */
.mobile-content-background {
    background-image: url('../images/ChatGPT Image 2.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.mobile-content-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

/* 手機版頁面背景 */
.mobile-page-background {
    background-image: url('../images/ChatGPT Image 3.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.mobile-page-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1;
}

/* 手機版footer背景 */
.mobile-footer-background {
    background-image: url('../images/ChatGPT Image 4.png');
    background-size: cover;
    background-position: center;
    position: relative;
}

.mobile-footer-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1;
}

/* 手機版響應式設計 */
@media (max-width: 768px) {
    /* 隱藏桌面版header */
    #header {
        display: none !important;
    }
    
    /* 顯示手機版header */
    .mobile-header {
        display: block !important;
    }
    
    /* 調整body padding */
    body {
        padding-top: 0; /* 移除body的padding-top */
    }
    
    /* Hero Section 手機版樣式 */
    .hero-section {
        margin-top: 0; /* 移除負margin */
        padding-top: 140px; /* 直接設定足夠的padding給mobile header */
        background-image: url('../images/ChatGPT Image 1.png') !important;
        background-size: cover !important;
        background-position: center !important;
        position: relative;
        min-height: calc(100vh - 140px); /* 調整最小高度 */
    }
    
    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, 
            rgba(139, 69, 19, 0.8), 
            rgba(160, 82, 45, 0.7),
            rgba(0, 0, 0, 0.5));
        z-index: 1;
    }
    
    .hero-content {
        position: relative;
        z-index: 2;
    }
    
    /* 內容區域背景 */
    .content-section:nth-child(odd) {
        background-image: url('../images/ChatGPT Image 2.png');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        position: relative;
    }
    
    .content-section:nth-child(odd)::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.9);
        z-index: 1;
    }
    
    .content-section:nth-child(odd) .container {
        position: relative;
        z-index: 2;
    }
    
    /* 確保第一個content section不會被header遮擋 */
    .content-section:first-of-type {
        padding-top: 80px;
    }
    
    /* Recipe detail page hero section 手機版樣式 */
    .recipe-header .container {
        padding: 160px 30px 40px 30px; /* 增加頂部padding給mobile header */
    }
    
    .hero-background {
        min-height: 500px; /* 確保足夠高度 */
    }
    
    /* Footer背景 */
    #footer {
        background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
        position: relative;
    }
    
    #footer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(139,69,19,0.1) 0%, rgba(61,41,20,0.05) 100%);
        opacity: 0.1;
        z-index: 1;
    }
    
    #footer .container {
        position: relative;
        z-index: 2;
    }
    
    /* 選單開啟時的body效果 */
    body.mobile-menu-open {
        overflow: hidden;
    }
    
    body.mobile-menu-open #wrapper {
        transform: translateX(-20%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* 小螢幕手機優化 */
@media (max-width: 480px) {
    .mobile-header-top {
        padding: 6px 12px;
    }
    
    .mobile-contact-info .contact-item {
        font-size: 10px;
    }
    
    .mobile-header-main {
        padding: 10px 12px;
    }
    
    .brand-name {
        font-size: 14px;
    }
    
    .welcome-text {
        font-size: 9px;
    }
    
    .mobile-menu-content {
        width: 90%;
        max-width: 300px;
    }
    
    #wrapper.menu-pushed {
        transform: translateX(-20%) scale(0.92);
    }
}

/* 橫向手機優化 */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-header-top {
        padding: 4px 15px;
    }
    
    .mobile-contact-info {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }
    
    .mobile-contact-info .contact-item {
        font-size: 9px;
        flex: 1;
    }
    
    body {
        padding-top: 0;
    }
    
    .hero-section {
        margin-top: 0;
        padding-top: 120px;
        min-height: calc(100vh - 120px);
    }
    
    /* Recipe detail page 超小螢幕樣式 */
    .recipe-header .container {
        padding: 140px 20px 35px 20px;
    }
    
    .hero-background {
        min-height: 450px;
    }
    
    /* Recipe detail page 額外優化 */
    .recipe-title {
        font-size: 1.8rem;
    }
    
    .recipe-subtitle {
        font-size: 1rem;
    }
    
    .recipe-description {
        font-size: 1rem;
    }
}

/* 手機header滾動時只顯示主區塊 */
.mobile-header.mobile-header-scrolled {
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    background: rgba(139, 69, 19, 0.98);
}
.mobile-header.mobile-header-scrolled .mobile-header-top {
    display: none !important;
}
.mobile-header.mobile-header-scrolled .mobile-header-main {
    padding-top: 8px;
    padding-bottom: 8px;
}