/**
 * 우리마음상담센터 - 메인 페이지 스타일
 */

/* ========================================
   히어로 배너
   ======================================== */
.hero-banner {
    position: relative;
    background: transparent;
    color: white;
    text-align: center;
    margin: 0 auto 3rem auto;
    display: flex;
    align-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 50%, #3498DB 100%);
    padding: 8px; /* 테두리 두께 */
    box-sizing: border-box !important; /* 박스 모델 확실히 */
    max-width: 1200px;
    width: calc(100% - 2rem);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* PC에서는 고정 높이 500px */
@media (min-width: 769px) {
    .hero-banner {
        height: 500px;
    }
}

/* 모바일에서는 16:9 비율 */
@media (max-width: 768px) {
    .hero-banner {
        aspect-ratio: 16/9;
        height: auto;
    }
}

/* ID 선택자로 더 높은 우선순위 */
#main-hero-banner {
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
    margin-top: 0 !important;
    margin-bottom: 3rem !important;
    width: calc(100% - 1rem) !important;
    box-sizing: border-box !important;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    text-align: center;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    text-align: center;
    color: white;
    z-index: 2;
    max-width: 600px;
    padding: 2rem;
}

.banner-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: bold;
}

.banner-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    font-weight: 500;
}

/* 배너 CTA 버튼 */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #2ECC71, #3498DB);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none;
}

.cta-button:hover {
    background: linear-gradient(135deg, #27AE60, #2980B9);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    text-decoration: none;
}

/* 배너 네비게이션 */
.banner-prev, .banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 3;
}

.banner-prev {
    left: 20px;
}

.banner-next {
    right: 20px;
}

.banner-prev:hover, .banner-next:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-50%) scale(1.1);
}

/* 배너 인디케이터 */
.banner-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active,
.indicator:hover {
    background: rgba(255,255,255,0.9);
    transform: scale(1.2);
}

/* ========================================
   이미지 플레이스홀더 - 메인 페이지용
   ======================================== */
.image-placeholder {
    width: 100% !important;
    margin: 1.5rem 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: block !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

/* PC에서는 고정 높이 400px */
@media (min-width: 769px) {
    .image-placeholder {
        height: 400px !important;
    }
}

/* 모바일에서는 16:9 비율 */
@media (max-width: 768px) {
    .image-placeholder {
        aspect-ratio: 16/9 !important;
        height: auto !important;
    }
}

/* 빈 플레이스홀더 텍스트 */
.image-placeholder:empty {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem !important;
    color: #6c757d !important;
    font-size: 1.1rem !important;
    background: #f8f9fa !important;
    border: 2px dashed #dee2e6 !important;
}

.image-placeholder:empty::before {
    content: "📷 이미지가 들어갈 영역";
}

/* 이미지 스타일 */
.image-placeholder img,
.image-placeholder .service-page-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 12px !important;
    display: block !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transition: transform 0.3s ease !important;
}

.image-placeholder:hover img,
.image-placeholder:hover .service-page-image {
    transform: scale(1.02) !important;
}

/* ========================================
   서비스 그리드
   ======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* PC: 2열 고정 */
    gap: 2rem;
    margin: 0 auto 3rem auto;
    max-width: 1200px;
    width: calc(100% - 2rem);
    padding: 0;
}

/* 모바일에서는 1열로 표시 */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr; /* 모바일: 1열 */
        gap: 1.5rem;
        padding: 0;
        width: calc(100% - 1rem);
    }
}

.service-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.05), rgba(52, 152, 219, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-image {
    aspect-ratio: 16/9;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    z-index: 2;
}

.service-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    transition: transform 0.3s ease;
    border-radius: 10px;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-image span {
    font-size: 1.2rem;
    line-height: 1.4;
    color: #666;
    text-align: center;
    padding: 1rem;
}

.service-content {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.service-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}

.service-content p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.service-link-wrapper {
    margin-top: auto;
    padding-top: 0.5rem;
}

.service-link {
    display: inline-block;
    color: #3498DB;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.service-card:hover .service-link {
    color: #2980B9;
}

/* ========================================
   반응형 스타일
   ======================================== */
@media (max-width: 768px) {
    /* 히어로 배너 */
    .hero-banner {
        margin: 1rem;
        border-radius: 10px;
    }
    
    .banner-content {
        padding: 1rem;
    }
    
    .banner-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        color: white !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
        font-weight: bold;
    }
    
    .banner-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        color: white !important;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
        font-weight: 500;
    }
    
    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        background: linear-gradient(135deg, #2ECC71, #3498DB) !important;
        color: white !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        border-radius: 20px !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 3px 10px rgba(0,0,0,0.2) !important;
        border: none !important;
    }
    
    .cta-button:hover {
        background: linear-gradient(135deg, #27AE60, #2980B9) !important;
        color: white !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
        text-decoration: none !important;
    }
    
    .banner-prev, .banner-next {
        padding: 0.5rem;
        font-size: 1rem;
    }
    
    /* 모바일 서비스 이미지 강제 꽉참 */
    .service-image {
        aspect-ratio: 16/9 !important;
        overflow: hidden !important;
        border-radius: 10px !important;
        margin-bottom: 0 !important;
        margin: 0 !important;
    }
    
    .service-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        border-radius: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 모바일에서 서비스 카드 패딩 조정 */
    .service-card {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .service-content {
        padding: 1rem !important;
        margin-top: 0 !important;
        margin: 0 !important;
    }
    
    /* 모바일에서 서비스 이미지 완전 꽉참 */
    .service-image {
        margin: 0 !important;
        margin-bottom: 0 !important;
        border-radius: 10px !important;
    }
    
    .service-image img {
        border-radius: 10px !important;
    }
    
    .banner-prev {
        left: 10px;
    }
    
    .banner-next {
        right: 10px;
    }
    
    .banner-indicators {
        bottom: 10px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    /* 서비스 그리드 */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem auto;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-image {
        margin-bottom: 1rem;
    }
    
    .service-content h3 {
        font-size: 1.2rem;
    }
    
    .service-content p {
        font-size: 0.95rem;
    }
}

/* 아이폰 같은 작은 화면 (480px 이하) */
@media (max-width: 480px) {
    .hero-banner {
        margin: 0.5rem;
        border-radius: 8px;
        padding: 6px;
    }
    
    .banner-content {
        padding: 0.8rem;
        max-width: 100%;
    }
    
    .banner-content h2 {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }
    
    .banner-content p {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
        line-height: 1.4;
    }
    
    .cta-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 20px !important;
    }
}

/* 매우 작은 화면 (360px 이하) */
@media (max-width: 360px) {
    .hero-banner {
        margin: 0.3rem;
        border-radius: 6px;
        padding: 4px;
    }
    
    .banner-content {
        padding: 0.6rem;
    }
    
    .banner-content h2 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
        line-height: 1.2;
    }
    
    .banner-content p {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
        line-height: 1.3;
    }
    
    .cta-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        border-radius: 18px !important;
    }
}
