/* 반응형 디자인 - 모바일 우선 접근법 */

/* 햄버거 메뉴 표시 (1045px 이하) */
@media screen and (max-width: 1045px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 0;
        padding-top: 50px;
        transition: left 0.3s ease;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        display: block;
        padding: 15px 20px;
        width: 100%;
        font-size: 1.2rem;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* 태블릿 (768px 이하) */
@media screen and (max-width: 768px) {

    .nav-logo img {
            height: 35px;
        }
    
    /* Typography */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .title-main {
        font-size: 2rem;
    }
    
    .title-sub {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* YouTube 배경 비디오 반응형 */
    #hero-youtube-player {
        top: calc(50% + 20px); /* 태블릿에서 약간 더 아래로 */
        width: 120vw;
        height: 67.5vw;
        min-height: 120vh;
        min-width: 213.33vh;
    }
    
    .hero-video-overlay {
        background: rgba(0, 0, 0, 0.4); /* 모바일에서 약간 더 어둡게 */
    }
    
    .hero-video-container {
        /* 모바일에서 성능 최적화 */
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    /* Header & Navigation */
    .nav-container {
        padding: 12px 15px;
    }
    
    .nav-logo h2 {
        font-size: 20px;
    }
    
    .nav-phone {
        margin-left: 15px;
        font-size: 13px;
    }
    
    
    /* Hero Section */
    .hero {
        height: 80vh;
        min-height: 600px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 250px;
    }
    
    .hero-features {
        gap: 25px;
    }
    
    .feature-item {
        font-size: 1rem;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    /* Timeline */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left;
        padding: 0 0 0 80px;
        margin: 30px 0;
    }
    
    .timeline-item .timeline-icon {
        left: 0 !important;
        right: auto !important;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .timeline-content h3 {
        font-size: 1.2rem;
    }
    
    /* Forms */
    .consultation-form {
        padding: 30px 20px;
    }
    
    .consultation-form-wrapper h3 {
        font-size: 1.6rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 15px;
        min-width: auto;
    }
    
    .phone-contact {
        font-size: 1rem;
        padding: 12px 16px;
    }
    
    /* Grid Layouts */
    .plan-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .building-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .plan-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .location-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .consultation-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    /* Tabs */
    .floor-plan-tabs {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 30px;
    }
    
    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
        flex: 1;
        min-width: 120px;
    }
    
    .info-tabs {
        flex-wrap: wrap;
    }
    
    .info-tab-btn {
        font-size: 14px;
        padding: 10px 15px;
        min-width: 80px;
    }
    
    /* Cards */
    .feature-card {
        padding: 25px 15px;
    }
    
    .feature-card i {
        font-size: 2rem;
    }
    
    .building-info {
        padding: 25px 20px;
    }
    
    .plan-info {
        padding: 25px 20px;
    }
    
    /* Floating Buttons */
    .floating-buttons {
        bottom: 20px;
        right: 20px;
        gap: 12px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Modal */
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-body {
        padding: 30px 20px;
    }
    
    .modal-icon {
        font-size: 3rem;
    }
    
    .modal-body h3 {
        font-size: 1.3rem;
    }
    
    .modal-body p {
        font-size: 1rem;
    }
    
    /* Consultation Final */
    .consultation-final {
        padding: 80px 0;
    }
    
    .consultation-text h2 {
        font-size: 2rem;
    }
    
    .consultation-text p {
        font-size: 1.1rem;
    }
    
    .consultation-form-final {
        padding: 30px 20px;
    }
    
    .consultation-form-final h3 {
        font-size: 1.5rem;
    }
    
    /* Specs */
    .spec-item,
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px 0;
    }
    
    .spec-label,
    .detail-item .label {
        font-weight: 600;
        color: #2c5aa0;
    }
    
    .spec-value,
    .detail-item .value {
        font-size: 1rem;
    }

    /* 아파트 이미지 슬라이더 태블릿 최적화 */
    .apartment-image {
        height: 300px; /* 태블릿에서 적절한 높이 */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .image-slider {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
    }

    .image-slider img {
        width: 100%; /* 각 슬라이드가 전체 너비 차지 */
        max-height: 100%;
        object-fit: contain; /* 원본 비율 유지하면서 영역에 맞춘다 */
    }

    .slider-controls {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* 모바일 (480px 이하) */
@media screen and (max-width: 480px) {

    .nav-logo img {
            height: 28px;
            margin-top: 5px;
        }
    
    /* Typography */
    .hero-title {
        font-size: 2rem;
    }
    
    .title-main {
        font-size: 1.6rem;
    }
    
    .title-sub {
        font-size: 2.4rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Container */
    .container {
        padding: 0 10px;
    }
    
    /* Header */
    .nav-container {
        padding: 10px;
    }
    
    .nav-logo h2 {
        font-size: 18px;
    }
    
    .nav-phone {
        margin-left: 10px;
        font-size: 12px;
    }
    
    .nav-phone a {
        display: none;
    }
    
    .nav-phone::before {
        content: '☎';
        margin-right: 5px;
    }
    
    /* Hero */
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    /* Sections */
    section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 35px;
    }
    
    /* Forms */
    .consultation-form {
        padding: 25px 15px;
        border-radius: 10px;
    }
    
    .consultation-form-wrapper h3 {
        font-size: 1.4rem;
    }
    
    .consultation-form-wrapper p {
        font-size: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 12px;
        font-size: 15px;
    }
    
    .btn-submit {
        padding: 18px 16px;
        font-size: 16px;
    }
    
    .phone-contact {
        font-size: 0.9rem;
        padding: 12px;
        text-align: center;
        flex-direction: column;
        gap: 5px;
    }
    
    /* Timeline */
    .timeline-item {
        padding: 0 0 0 60px;
        margin: 25px 0;
    }
    
    .timeline-icon {
        width: 45px;
        height: 45px;
    }
    
    .timeline-content {
        padding: 15px;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
    }
    
    .timeline-date {
        font-size: 0.9rem;
    }
    
    /* Cards */
    .feature-card {
        padding: 20px 10px;
    }
    
    .feature-card i {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .feature-card h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .feature-card p {
        font-size: 1rem;
    }
    
    .building-info {
        padding: 20px 15px;
    }
    
    .building-info h4 {
        font-size: 1.2rem;
    }
    
    /* Tabs */
    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .info-tab-btn {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    /* Plan Info */
    .plan-info {
        padding: 20px 15px;
    }
    
    .plan-info h4 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    /* Location */
    .location-map #map {
        height: 300px;
    }
    
    .facility-list li {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Consultation Final */
    .consultation-final {
        padding: 60px 0;
    }
    
    .consultation-text h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .consultation-text p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .benefit-item {
        font-size: 1rem;
    }
    
    .consultation-form-final {
        padding: 25px 15px;
    }
    
    .consultation-form-final h3 {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        gap: 25px;
    }
    
    .footer-links {
        justify-content: center;
        gap: 15px;
    }
    
    .footer-links a {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .footer-bottom {
        padding-top: 25px;
    }
    
    .footer-disclaimer {
        font-size: 0.8rem;
    }
    
    /* Floating Buttons */
    .floating-buttons {
        bottom: 15px;
        right: 15px;
        gap: 10px;
    }
    
    .floating-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    /* Modal */
    .modal-content {
        margin: 5% auto;
    }
    
    .modal-body {
        padding: 25px 15px;
    }
    
    .modal-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .modal-body h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .modal-body p {
        font-size: 0.95rem;
    }
    
    .close {
        right: 15px;
        top: 15px;
        font-size: 24px;
    }
}

/* 큰 화면 (1200px 이상) */
@media screen and (min-width: 1200px) {

    .container {
        max-width: 1400px;
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .title-sub {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 2.8rem;
    }
    
    .consultation-content {
        gap: 80px;
    }
    
    .plan-content,
    .location-content {
        gap: 60px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .building-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 초고해상도 화면 (1600px 이상) */
@media screen and (min-width: 1600px) {

    .container {
        max-width: 1400px;
        padding: 0 40px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .title-sub {
        font-size: 5rem;
    }
}

/* 프린트 스타일 */
@media print {
    
    .header,
    .floating-buttons,
    .consultation-form-section,
    .modal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    .hero {
        height: auto;
        padding: 50px 0;
        background: #fff !important;
        color: #000 !important;
    }
    
    .hero-content,
    .consultation-final {
        background: #fff !important;
        color: #000 !important;
    }
    
    .hero-title,
    .section-title,
    h1, h2, h3, h4 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    section {
        page-break-inside: avoid;
        padding: 30px 0;
    }
    
    .timeline-item,
    .feature-card,
    .building-item {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .btn,
    .phone-contact {
        border: 2px solid #000 !important;
        color: #000 !important;
        background: #fff !important;
        text-decoration: none;
    }
    
    .footer {
        background: #fff !important;
        color: #000 !important;
        border-top: 2px solid #000;
    }
}

/* 접근성 향상 */
@media (prefers-reduced-motion: reduce) {
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    .timeline-item.current .timeline-icon {
        animation: none;
    }
    
    .spinner {
        animation: none;
        border-top-color: transparent;
    }
}

/* 다크모드 지원 - 비활성화됨 */
/* @media (prefers-color-scheme: dark) {
    
    .header {
        background: rgba(30, 30, 30, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .nav-link {
        color: #e9ecef;
    }
    
    .consultation-form,
    .feature-card,
    .building-item,
    .plan-info,
    .modal-content {
        background: #2d2d2d;
        color: #e9ecef;
        border-color: #444;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #333;
        color: #e9ecef;
        border-color: #555;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #2c5aa0;
        background: #3a3a3a;
    }
} */

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    
    .btn-primary {
        background: #000;
        border: 2px solid #fff;
    }
    
    .btn-outline {
        border-width: 3px;
        background: #fff;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: #000;
        color: #fff;
    }
    
    .timeline-icon,
    .floating-btn {
        border: 3px solid #000;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: 3px solid #000;
        outline-offset: 2px;
    }
}

/* iOS Safari 특정 수정 */
@supports (-webkit-touch-callout: none) {
    
    .hero {
        min-height: -webkit-fill-available;
    }
    
    .floating-btn {
        -webkit-tap-highlight-color: transparent;
    }
    
    input, select, textarea {
        -webkit-appearance: none;
        border-radius: 8px;
    }
}

/* 가로모드 모바일 최적화 */
@media screen and (max-width: 768px) and (orientation: landscape) {
    
    .hero {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-content {
        padding: 20px 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        gap: 12px;
        margin-bottom: 2rem;
    }
    
    .hero-buttons .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .hero-features {
        gap: 20px;
    }
    
    .nav-menu {
        height: calc(100vh - 60px);
        padding-top: 30px;
    }
    
    .scroll-indicator {
        bottom: 15px;
    }
    
    /* YouTube 비디오 추가 최적화 (작은 화면) */
    #hero-youtube-player {
        top: calc(50% + 25px); /* 모바일에서 더 많이 아래로 */
        width: 150vw;
        height: 84.375vw;
        min-height: 150vh;
        min-width: 266.67vh;
    }
    
    .hero-video-overlay {
        background: rgba(0, 0, 0, 0.5); /* 작은 화면에서 더 어둡게 */
    }

    /* 아파트 이미지 슬라이더 모바일 최적화 */
    .apartment-image {
        margin: 15px 0;
        height: 250px; /* 모바일에서 적절한 고정 높이 */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .image-slider {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
    }

    .image-slider img {
        width: 100%; /* 각 슬라이드가 전체 너비 차지 */
        max-height: 100%;
        object-fit: contain; /* 모바일에서도 원본 비율 유지 */
    }

    .slider-controls {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .prev-btn {
        left: 5px;
    }

    .next-btn {
        right: 5px;
    }

    .slider-indicators {
        bottom: 10px;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }
}

/* 프리미엄 섹션 반응형 */
@media screen and (max-width: 768px) {
    .premium-section {
        padding: 80px 0;
    }

    .premium-logo {
        margin-bottom: 60px;
    }

    .premium-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .premium-section .cultural-space-title .main-title {
        font-size: 1.3rem;
    }

    .premium-section .cultural-space-title .sub-title {
        font-size: 2rem;
    }

    .premium-section .section-title {
        font-size: 2rem;
    }

    .premium-row {
        grid-template-columns: 1fr;
        gap: 60px;
        margin-bottom: 80px;
    }

    .premium-item {
        justify-content: center;
    }

    .premium-item.left,
    .premium-item.right {
        flex-direction: row;
    }

    .premium-content {
        padding: 20px;
        gap: 20px;
    }

    .premium-content {
        flex-direction: column;
        text-align: center;
    }

    .premium-image {
        width: 100%;
    }
        .premium-image img {
            width: auto;
        }

    .premium-text h4 {
        font-size: 1.3rem;
    }

    .premium-text p {
        font-size: 0.95rem;
    }

    .premium-number {
        top: -15px;
        left: 50%;
        transform: translateX(-50%);
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .premium-section {
        padding: 60px 0;
    }

    .premium-logo {
        margin-bottom: 40px;
    }

    .brand-name {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }

    .brand-desc {
        font-size: 0.8rem;
    }

    .premium-title {
        font-size: 2rem;
        letter-spacing: 1.5px;
    }

    .premium-section .cultural-space-title .main-title {
        font-size: 1rem;
    }

    .premium-section .cultural-space-title .sub-title {
        font-size: 1.6rem;
    }

    .premium-section .section-title {
        font-size: 1.8rem;
    }

    .premium-row {
        gap: 30px;
        margin-bottom: 60px;
    }

    .premium-content {
        gap: 0px;
    }

    .premium-image {
        max-width: 300px;
    }

         .premium-image img.premium-logo {
            width:100%;
         }

    .premium-text h4 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .premium-text p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .premium-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        top: -12px;
    }
}
