/* 
=================================
ABOUT IMAGE FIX - CSS
=================================
File: about-image-fix.css
Mục đích: Điều chỉnh hình ảnh bằng tốt nghiệp không bị bóp méo
*/

/* ===================================== */
/* ABOUT SECTION IMAGE FIXES             */
/* ===================================== */

/* Fix for about image to prevent distortion */
.about-img {
    width: 100%;
    height: 500px;
    object-fit: cover; /* Đổi thành cover để cắt bỏ phần thừa */
    object-position: center top; /* Tập trung vào phần trên, cắt phần dưới */
    border-radius: 15px;
    background: #f8f8f8; /* Màu nền để fill phần trống */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    /* Cắt bỏ phần dưới bằng clip-path */
    clip-path: inset(0 0 15% 0); /* Cắt 15% phần dưới */
}

/* Alternative styling with cover but controlled height */
.about-img.cover-style {
    object-fit: cover;
    object-position: center top; /* Tập trung vào phần trên của hình */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .about-img {
        height: 400px;
        clip-path: inset(0 0 18% 0); /* Điều chỉnh cắt cho tablet */
    }
    
    .about-img.portrait-layout {
        height: 500px;
        clip-path: inset(0 0 22% 0); /* Cắt nhiều hơn cho portrait trên tablet */
    }
}

@media (max-width: 768px) {
    .about-img {
        height: 350px;
        border-radius: 12px;
        clip-path: inset(0 0 20% 0); /* Cắt phần dưới trên mobile */
    }
    
    .about-img.portrait-layout {
        height: 400px;
        clip-path: inset(0 0 25% 0); /* Cắt nhiều hơn cho mobile */
    }
}

@media (max-width: 480px) {
    .about-img {
        height: 300px;
        border-radius: 10px;
        clip-path: inset(0 0 22% 0); /* Cắt phần dưới trên small mobile */
    }
    
    .about-img.portrait-layout {
        height: 350px;
        clip-path: inset(0 0 28% 0); /* Cắt nhiều nhất cho small mobile */
    }
}

/* Hover effects */
.about-img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Enhanced container styling */
.about-picture {
    display: block;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.1);
}

.main-image-wrapper {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.1);
    transition: all 0.3s ease;
}

.main-image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(233, 30, 99, 0.2);
}

/* Image overlay adjustments */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(233, 30, 99, 0.1) 0%,
        rgba(233, 30, 99, 0.05) 50%,
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.main-image-wrapper:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
}

.certification-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 25px;
    color: var(--primary-color, #e91e63);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(233, 30, 99, 0.2);
}

.certification-badge i {
    font-size: 16px;
    color: #ffd700;
}

/* Alternative layout for portrait images */
.about-img.portrait-layout {
    height: 600px;
    object-fit: cover; /* Đổi thành cover */
    object-position: center top; /* Tập trung vào phần trên */
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    /* Cắt bỏ phần màu hồng ở dưới */
    clip-path: inset(0 0 20% 0); /* Cắt 20% phần dưới cho portrait */
}

@media (max-width: 1024px) {
    .about-img.portrait-layout {
        height: 500px;
        clip-path: inset(0 0 22% 0); /* Cắt nhiều hơn cho portrait trên tablet */
    }
}

@media (max-width: 768px) {
    .about-img.portrait-layout {
        height: 400px;
        clip-path: inset(0 0 25% 0); /* Cắt nhiều hơn cho mobile */
    }
}

/* Fallback cho trình duyệt không hỗ trợ clip-path */
@supports not (clip-path: inset(0)) {
    .about-img {
        overflow: hidden;
    }
    
    .about-img::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 20%;
        background: linear-gradient(135deg, #fce4ec, #f8bbd0);
        z-index: 1;
    }
}
