/* 响应式设计 - 支持手机端显示 */

/* 基础响应式设置 */
* {
    box-sizing: border-box;
}

/* 移动端优先设计 */

/* 小屏手机 (< 480px) */
@media (max-width: 480px) {
    /* 导航栏调整 */
    .romana_header_bottom .container .row {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .romana_header_bottom .col-sm-2 {
        width: 60%;
        flex: 0 0 60%;
        max-width: 60%;
    }
    
    .romana_header_bottom .col-sm-8 {
        width: 40%;
        flex: 0 0 40%;
        max-width: 40%;
        text-align: right;
    }
    
    .romana_logo img {
        max-height: 60px;
        width: auto;
    }
    
    /* 导航菜单 */
    nav#navbar {
        position: absolute;
        width: 90%;
        max-width: 320px;
        padding: 15px !important;
        background: #ffffff;
        z-index: 9999;
        right: 5%;
        top: 85px;
        border: 10px solid #ffffff;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    nav#navbar.collapse.in {
        display: block;
    }
    
    .navbar-header {
        display: block !important;
        text-align: right;
    }
    
    .navbar-toggle {
        display: block !important;
        margin-right: 0;
        background: #0075c1;
        border: none;
        border-radius: 4px;
        padding: 10px 15px;
        color: white;
    }
    
    .navbar-toggle:hover {
        background: #0056b3;
    }
    
    .navbar-nav {
        margin: 0;
    }
    
    .navbar-nav > li {
        float: none;
        width: 100%;
    }
    
    .navbar-nav > li > a {
        padding: 15px 20px;
        display: block;
        font-size: 16px !important;
        color: #333;
    }
    
    .navbar-nav > li > a:hover {
        background: #f8f9fa;
    }
    
    /* 下拉菜单 */
    .menuUl02 {
        position: static !important;
        width: 100% !important;
        margin-top: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #f8f9fa;
    }
    
    .subMenu02 {
        width: 100% !important;
        margin-top: 0 !important;
    }
    
    .subMenu02 a {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    
    /* 内容区域 */
    .container {
        width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    /* 图片响应式 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 文本调整 */
    h1, h2, h3, h4, h5, h6 {
        font-size: 1.8em !important;
        line-height: 1.3;
    }
    
    p, div, span {
        font-size: 16px !important;
        line-height: 1.5;
    }
    
    /* 按钮调整 */
    .btnaSet {
        padding: 15px 30px !important;
        font-size: 16px !important;
        margin: 10px 0;
    }
    
    /* 布局调整 */
    .view_contents[style*="display: flex"] {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .view_contents[style*="width: 900px"] {
        width: 100% !important;
    }
    
    /* 间距调整 */
    .view_contents {
        margin: 30px 0 !important;
    }
    
    /* 轮播图调整 */
    .owl-carousel {
        max-height: 250px;
    }
    
    .owl-nav .owl-prev,
    .owl-nav .owl-next {
        width: 40px !important;
        height: 40px !important;
        line-height: 30px !important;
        font-size: 16px !important;
    }
    
    /* 页脚调整 */
    .romana_footer_bottom_text p {
        font-size: 14px !important;
    }
    
    /* 通用容器调整 */
    body {
        font-size: 16px !important;
    }
    
    /* 表单元素调整 */
    input, textarea, select {
        font-size: 16px !important;
        padding: 10px !important;
    }
}

/* 手机端 (480px - 768px) */
@media (min-width: 480px) and (max-width: 768px) {
    /* 导航栏调整 */
    .romana_header_bottom .container .row {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .romana_header_bottom .col-sm-2 {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .romana_header_bottom .col-sm-8 {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
        text-align: right;
    }
    
    .romana_logo img {
        max-height: 70px;
        width: auto;
    }
    
    /* 导航菜单 */
    nav#navbar {
        position: absolute;
        width: 90%;
        max-width: 350px;
        padding: 20px !important;
        background: #ffffff;
        z-index: 9999;
        right: 5%;
        top: 95px;
        border: 10px solid #ffffff;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    nav#navbar.collapse.in {
        display: block;
    }
    
    .navbar-header {
        display: block !important;
        text-align: right;
    }
    
    .navbar-toggle {
        display: block !important;
        margin-right: 0;
        background: #0075c1;
        border: none;
        border-radius: 4px;
        padding: 12px 18px;
        color: white;
        font-size: 16px;
    }
    
    .navbar-toggle:hover {
        background: #0056b3;
    }
    
    .navbar-nav {
        margin: 0;
    }
    
    .navbar-nav > li {
        float: none;
        width: 100%;
    }
    
    .navbar-nav > li > a {
        padding: 15px 20px;
        display: block;
        font-size: 18px !important;
        color: #333;
    }
    
    .navbar-nav > li > a:hover {
        background: #f8f9fa;
    }
    
    /* 下拉菜单 */
    .menuUl02 {
        position: static !important;
        width: 100% !important;
        margin-top: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #f8f9fa;
    }
    
    .subMenu02 {
        width: 100% !important;
        margin-top: 0 !important;
    }
    
    .subMenu02 a {
        padding: 12px 20px !important;
        font-size: 16px !important;
    }
    
    /* 内容区域 */
    .container {
        width: 100% !important;
        padding-left: 25px !important;
        padding-right: 25px !important;
    }
    
    /* 图片响应式 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 文本调整 */
    h1, h2, h3, h4, h5, h6 {
        font-size: 2em !important;
        line-height: 1.3;
    }
    
    p, div, span {
        font-size: 17px !important;
        line-height: 1.5;
    }
    
    /* 按钮调整 */
    .btnaSet {
        padding: 18px 35px !important;
        font-size: 18px !important;
        margin: 15px 0;
    }
    
    /* 布局调整 */
    .view_contents[style*="display: flex"] {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .view_contents[style*="width: 900px"] {
        width: 100% !important;
    }
    
    /* 间距调整 */
    .view_contents {
        margin: 35px 0 !important;
    }
    
    /* 轮播图调整 */
    .owl-carousel {
        max-height: 350px;
    }
    
    .owl-nav .owl-prev,
    .owl-nav .owl-next {
        width: 45px !important;
        height: 45px !important;
        line-height: 35px !important;
        font-size: 18px !important;
    }
    
    /* 通用容器调整 */
    body {
        font-size: 17px !important;
    }
}

/* 平板端 (768px - 1200px) */
@media (min-width: 768px) and (max-width: 1200px) {
    /* 导航栏调整 */
    .romana_header_bottom .col-sm-2 {
        width: 30%;
        flex: 0 0 30%;
        max-width: 30%;
    }
    
    .romana_header_bottom .col-sm-8 {
        width: 70%;
        flex: 0 0 70%;
        max-width: 70%;
    }
    
    /* 内容区域 */
    .container {
        width: 100% !important;
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
    
    /* 布局调整 */
    .view_contents[style*="width: 900px"] {
        width: 100% !important;
    }
}

/* 通用响应式类 */
.responsive-logo {
    max-width: 100%;
    height: auto;
}

.responsive-image {
    max-width: 100%;
    height: auto;
}

.responsive-container {
    width: 100%;
    padding: 0 15px;
}

/* imgTextUl 响应式样式 - 防止被挤压 */
.imgTextUl {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
}

.imgTextLi {
    flex: 0 0 calc(33.333% - 20px) !important;
    max-width: calc(33.333% - 20px) !important;
    margin: 10px !important;
    box-sizing: border-box !important;
}

.imgTextLi img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* 平板端 */
@media (max-width: 768px) {
    .imgTextLi {
        flex: 0 0 calc(50% - 15px) !important;
        max-width: calc(50% - 15px) !important;
        margin: 8px !important;
    }
}

/* 手机端 */
@media (max-width: 480px) {
    .imgTextUl {
        padding: 0 5px !important;
    }
    
    .imgTextLi {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
    }
    
    .imgTextLi img {
        max-width: 250px !important;
    }
}

/* 触摸友好设计 */
@media (hover: none) and (pointer: coarse) {
    /* 增大点击区域 */
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-block;
    }
    
    /* 导航菜单点击优化 */
    .dropdown-toggle {
        position: relative;
        padding-right: 20px;
    }
    
    .dropdown-toggle::after {
        content: '▼';
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 12px;
    }
}

/* 横屏适配 */
@media (orientation: landscape) and (max-width: 768px) {
    /* 导航栏调整 */
    .romana_header_bottom .col-sm-2 {
        width: 40%;
        flex: 0 0 40%;
        max-width: 40%;
    }
    
    .romana_header_bottom .col-sm-8 {
        width: 60%;
        flex: 0 0 60%;
        max-width: 60%;
    }
    
    /* 轮播图调整 */
    .owl-carousel {
        max-height: 250px;
    }
}

/* 高分辨率屏幕 */
@media (-webkit-device-pixel-ratio: 2), (device-pixel-ratio: 2) {
    /* 图片优化 */
    .romana_logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 打印样式 */
@media print {
    /* 隐藏导航和预加载 */
    #preloader,
    header {
        display: none !important;
    }
    
    /* 内容区域调整 */
    .container {
        width: 100% !important;
        max-width: 100% !important;
    }
}