/* ========================================
   표준 반응형 브레이크포인트 시스템
   ======================================== */

/* 배너 크기 설정 - 16:9 비율 + 적절한 제한 */
.hero-section {
    height: 56.25vw; /* 16:9 비율 (9/16 * 100) */
    max-height: 700px; /* 대형 화면 제한 */
    min-height: 450px; /* 소형 화면 제한 증가 */
}

/* Extra Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .header-content {
        padding: 0 30px;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .header-phone {
        font-size: 1.1rem;
    }
    
    .header-menu-buttons {
        gap: 15px;
    }
    
    .main-navigation {
        margin-left: 20px;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    /* hero-title과 hero-subtitle은 main.css의 clamp() 함수 사용 */
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop (768px - 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
    .container {
        max-width: 1140px;
        padding: 0 20px;
    }
    
    .header-content {
        padding: 0 20px;
        max-width: 1140px;
        margin: 0 auto;
    }
    
    .logo-title {
        font-size: 1.6rem;
    }
    
    .logo-subtitle {
        font-size: 0.8rem;
    }
    
    .header-phone {
        font-size: 1rem;
    }
    
    .header-menu-buttons {
        gap: 12px;
    }
    
    .header-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .main-navigation {
        margin-left: 15px;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-menu {
        gap: 25px;
    }
    
    .nav-menu li a {
        font-size: 0.9rem;
    }
    
    .logo-title {
        font-size: 1.7rem;
    }
    
    .logo-subtitle {
        font-size: 0.85rem;
    }
    
    /* hero-title과 hero-subtitle은 main.css의 clamp() 함수 사용 */
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    
    .footer-content {
        gap: 40px;
    }
    
    .footer-info {
        gap: 30px;
    }
}

/* Mobile (max-767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
    
    .site-main {
        margin-top: 50px;
    }
    
    .page-wrapper {
        margin-top: 50px;
        padding: 20px 0;
    }
    
    /* 서비스 페이지와 블로그 페이지의 중복 여백 제거 */
    .services-page-wrapper .page-wrapper,
    .blog-page-wrapper .page-wrapper {
        margin-top: 0;
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    .logo-title {
        font-size: 1.4rem;
    }
    
    .logo-subtitle {
        font-size: 0.75rem;
    }
    
    .header-phone {
        display: none;
    }
    
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        width: 50px;
        height: 50px;
        padding: 10px;
    }
    
    .hamburger-line {
        width: 22px;
        height: 2px;
    }
    
    .hero-section {
        height: 56.25vw; /* 16:9 비율 유지 */
        max-height: 500px; /* 모바일 최대 높이 */
        min-height: 400px; /* 모바일 최소 높이 증가 */
    }
    
    .hero-content {
        padding: 60px 20px 20px;
    }
    
    /* hero-title과 hero-subtitle은 main.css의 clamp() 함수 사용 */
    .hero-title {
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        margin-bottom: 30px;
    }
    
    .hero-buttons {
        gap: 15px;
        flex-direction: column;
        max-width: 280px;
    }
    
    .btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .slider-controls {
        padding: 0 15px;
        pointer-events: none;
    }
    
    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        touch-action: manipulation;
        min-width: 40px;
        min-height: 40px;
        pointer-events: auto;
        position: relative;
        z-index: 16;
        font-size: 1.2rem;
    }
    
    .slider-indicators {
        bottom: 20px;
        gap: 8px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    .services-section,
    .blog-section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .services-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .service-item {
        padding: 0;
        display: flex;
        flex-direction: column;
        height: 100%;
        border-radius: 15px;
        overflow: hidden;
        background: white;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .service-icon {
        width: 100%;
        aspect-ratio: 16/9;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        margin-bottom: 0;
    }
    
    .service-icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }
    
    .service-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 20px 15px;
    }
    
    .service-title {
        padding: 0;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .service-description {
        font-size: 0.9rem;
        margin-bottom: 15px;
        padding: 0;
        text-align: center;
        flex: 1;
    }
    
    .service-link {
        margin-top: auto;
    }
    
    .blog-section .blog-thumbnail {
        aspect-ratio: 16/9;
        height: auto;
    }
    
    /* 767px 이하 모바일에서 프론트 페이지 placeholder 스타일 */
    .blog-section .blog-placeholder {
        aspect-ratio: 16/9;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .blog-section .placeholder-icon {
        font-size: 1.2rem;
    }
    
    .blog-section .placeholder-text {
        font-size: 0.65rem;
        line-height: 1.1;
    }

    .blog-section .blog-content {
        padding: 20px;
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    
    .blog-section .blog-header {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    
    .blog-title {
        font-size: 1.2rem;
        flex: 1;
    }
    
    .blog-section .blog-card-category {
        font-size: 0.75rem;
        padding: 2px 6px;
        margin-top: auto;
        align-self: center;
    }
    
    .cta-section {
        padding: 50px 0;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .cta-buttons {
        gap: 15px;
        flex-direction: column;
        max-width: 280px;
        margin-bottom: 30px;
    }
    
    .cta-features {
        gap: 15px;
        flex-direction: column;
    }
    
    .site-footer {
        padding: 40px 0 15px;
    }
    
    .footer-content {
        gap: 25px;
        flex-direction: column;
    }
    
    .footer-info {
        gap: 25px;
        flex-direction: column;
    }
    
    .company-info {
        text-align: center;
    }
    
    .social-links {
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
        gap: 20px;
    }
    
    .footer-nav-list {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        gap: 20px;
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 100px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .quick-contact-mobile {
        display: flex;
        bottom: 20px;
        left: 20px;
        right: 20px;
        gap: 10px;
    }
    
    .mobile-navigation {
        width: 280px;
    }
    
    .mobile-nav-cta {
        padding: 20px;
    }
    
    .mobile-cta-phone,
    .mobile-cta-estimate {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Small Mobile (max-480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .page-wrapper {
        margin-top: 55px;
        padding: 15px 0;
    }
    
    /* 서비스 페이지와 블로그 페이지의 중복 여백 제거 */
    .services-page-wrapper .page-wrapper,
    .blog-page-wrapper .page-wrapper {
        margin-top: 0;
    }
    
    .header-top {
        padding: 8px 0;
    }
    
    .site-main {
        margin-top: 50px;
    }
    
    .header-main {
        padding: 10px 0;
    }
    
    .logo-title {
        font-size: 1.2rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
    
    .mobile-menu-toggle {
        width: 45px;
        height: 45px;
        padding: 8px;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
    }
    
    .mobile-navigation {
        width: 100%;
        border-radius: 0;
    }
    
    .mobile-nav-header {
        padding: 15px;
    }
    
    .mobile-nav-title {
        font-size: 1.1rem;
    }
    
    .mobile-nav-cta {
        padding: 15px;
    }
    
    .mobile-cta-phone,
    .mobile-cta-estimate {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .hero-section {
        height: 56.25vw; /* 16:9 비율 유지 */
        max-height: 400px; /* 작은 모바일 최대 높이 */
        min-height: 350px; /* 작은 모바일 최소 높이 증가 */
    }
    
    .hero-content {
        padding: 40px 15px 15px;
    }
    
    /* hero-title과 hero-subtitle은 main.css의 clamp() 함수 사용 */
    .hero-title {
        margin-bottom: 12px;
    }
    
    .hero-subtitle {
        margin-bottom: 25px;
    }
    
    .hero-buttons {
        max-width: 250px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .slider-prev,
    .slider-next {
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        touch-action: manipulation;
        min-width: 35px;
        min-height: 35px;
        pointer-events: auto;
        position: relative;
        z-index: 16;
        font-size: 1rem;
    }
    
    .slider-indicators {
        bottom: 15px;
        gap: 6px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
    
    .services-section,
    .blog-section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .services-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .service-item {
        padding: 0;
        display: flex;
        flex-direction: column;
        height: 100%;
        border-radius: 15px;
        overflow: hidden;
        background: white;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .service-icon {
        width: 100%;
        aspect-ratio: 16/9;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        margin-bottom: 0;
    }
    
    .service-icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }
    
    .service-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 15px 12px;
    }
    
    .service-title {
        padding: 0;
        margin-bottom: 8px;
        text-align: center;
        font-size: 1rem;
    }
    
    .service-description {
        font-size: 0.85rem;
        margin-bottom: 12px;
        padding: 0;
        text-align: center;
        flex: 1;
    }
    
    .service-link {
        margin-top: auto;
    }
    
    /* 480px 이하 모바일에서도 프론트 페이지 placeholder 스타일 */
    .blog-section .blog-placeholder {
        aspect-ratio: 16/9;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .blog-section .placeholder-icon {
        font-size: 1.2rem;
    }
    
    .blog-section .placeholder-text {
        font-size: 0.65rem;
        line-height: 1.1;
    }

    .blog-section .blog-content {
        padding: 18px;
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    
    .blog-section .blog-header {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    
    .blog-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
        flex: 1;
    }
    
    .blog-section .blog-card-category {
        font-size: 0.7rem;
        padding: 1px 6px;
        margin-top: auto;
        align-self: center;
    }
    
    .cta-section {
        padding: 40px 0;
    }
    
    .cta-title {
        font-size: 1.6rem;
    }
    
    .cta-subtitle {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }
    
    .cta-buttons {
        max-width: 250px;
        margin-bottom: 25px;
    }
    
    .cta-features {
        gap: 12px;
    }
    
    .feature-text {
        font-size: 0.85rem;
    }
    
    .site-footer {
        padding: 30px 0 12px;
    }
    
    .footer-content {
        gap: 20px;
    }
    
    .footer-info {
        gap: 20px;
    }
    
    .footer-logo h3 {
        font-size: 1.4rem;
    }
    
    .footer-logo-sub {
        font-size: 0.8rem;
    }
    
    .company-details {
        margin-top: 12px;
    }
    
    .company-name,
    .company-address {
        font-size: 0.85rem;
    }
    
    .contact-info {
        gap: 5px;
    }
    
    .contact-item {
        font-size: 0.85rem;
    }
    
    .social-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .social-icons {
        gap: 15px;
    }
    
    .social-link {
        font-size: 0.85rem;
    }
    
    .footer-nav-list {
        gap: 10px;
    }
    
    .footer-nav-list li a {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        gap: 10px;
        font-size: 0.8rem;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    .back-to-top {
        bottom: 80px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .quick-contact-mobile {
        bottom: 15px;
        left: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .quick-call-btn,
    .quick-estimate-btn {
        padding: 10px;
        font-size: 0.8rem;
        border-radius: 18px;
    }
    
    .mobile-navigation {
        width: 100%;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-icon img,
    .footer-logo,
    .logo-text {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .mobile-navigation,
    .mobile-menu-overlay,
    .slider-controls,
    .slider-indicators,
    .back-to-top,
    .quick-contact-mobile,
    .cta-section,
    .header-top {
        display: none !important;
    }
    
    .site-main {
        margin-top: 0;
    }
    
    .hero-section {
        height: auto;
        min-height: auto;
        page-break-after: always;
    }
    
    .hero-content {
        padding: 20px;
        color: #000;
    }
    
    .hero-bg,
    .hero-overlay {
        display: none;
    }
    
    .services-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .service-item,
    .blog-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .site-footer {
        border-top: 2px solid #000;
        color: #000;
        background: #fff !important;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-slide {
        transition: none;
    }
    
    .slider-prev,
    .slider-next,
    .indicator {
        transition: none;
    }
    
    .service-item:hover,
    .blog-item:hover {
        transform: none;
    }
    
    .phone-icon {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
@media (prefers-reduced-motion: no-preference) {
    button:focus,
    a:focus,
    input:focus,
    textarea:focus {
        outline: 2px solid #40E0D0;
        outline-offset: 2px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Currently maintaining light theme for brand consistency */
    /* Can be implemented later if needed */
}

/* 블로그 썸네일 16:9 비율 고정 */
.blog-section .blog-thumbnail {
    aspect-ratio: 16/9;
    height: auto;
}

.blog-section .blog-placeholder {
    aspect-ratio: 16/9;
    height: auto;
}