/**
 * ========================================================
 * KFPR - Korean Foundation of Puerto Rico
 * Custom Styles for Blocksy Theme + Elementor Pro
 * ========================================================
 * 
 * 적용 방법:
 *   방법 1) Appearance → Customize → Additional CSS 에 붙여넣기
 *   방법 2) Code Snippets 플러그인 → CSS Snippet 으로 추가
 *   방법 3) 자식 테마 style.css 에 추가
 * ========================================================
 */

/* ================================
   1. CSS Variables (Design Tokens)
   ================================ */
:root {
    --kfpr-primary: #003478;
    --kfpr-primary-light: #0056b3;
    --kfpr-accent: #C60C30;
    --kfpr-secondary: #0F172A;
    --kfpr-bg-light: #F3F4F6;
    --kfpr-surface: #FFFFFF;
    --kfpr-text: #1E293B;
    --kfpr-text-muted: #6B7280;
    --kfpr-shadow-card: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --kfpr-shadow-card-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --kfpr-radius-lg: 16px;
    --kfpr-radius-xl: 24px;
}

/* ================================
   2. Global Typography
   ================================ */
body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--kfpr-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   3. Korean Border Top Pattern
   ================================ */
.kfpr-korean-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--kfpr-primary) 0,
        var(--kfpr-primary) 20px,
        var(--kfpr-accent) 20px,
        var(--kfpr-accent) 40px
    );
    border-radius: 12px 12px 0 0;
    z-index: 1;
}

/* ================================
   4. Hero Section Styles
   ================================ */
.kfpr-hero {
    position: relative;
    min-height: 700px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.kfpr-hero .elementor-background-overlay {
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.8),
        rgba(15, 23, 42, 0.6),
        rgba(15, 23, 42, 0.9)
    ) !important;
}

/* Hero Blue Overlay Effect */
.kfpr-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 52, 120, 0.3);
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

/* Hero subtitle glassmorphism box */
.kfpr-hero-subtitle {
    background: rgba(0, 0, 0, 0.2);
    padding: 24px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

/* Hero colored text */
.kfpr-text-blue-300 {
    color: #93C5FD !important;
}

.kfpr-text-red-300 {
    color: #FCA5A5 !important;
}

/* ================================
   5. Stats Bar Section
   ================================ */
.kfpr-stats-bar {
    margin-top: -64px !important;
    position: relative;
    z-index: 20;
}

.kfpr-stats-bar > .elementor-container {
    max-width: 1000px !important;
}

.kfpr-stats-card {
    background: var(--kfpr-surface);
    border-radius: var(--kfpr-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Stats korean border top */
.kfpr-stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--kfpr-primary) 0,
        var(--kfpr-primary) 20px,
        var(--kfpr-accent) 20px,
        var(--kfpr-accent) 40px
    );
    border-radius: 12px 12px 0 0;
}

.kfpr-stats-number {
    font-size: 48px !important;
    font-weight: 800 !important;
    color: var(--kfpr-primary) !important;
    line-height: 1.1 !important;
}

.kfpr-stats-label {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--kfpr-text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
}

/* Stats column dividers */
.kfpr-stats-card > .elementor-container > .elementor-column:not(:last-child) {
    border-right: 1px solid #E5E7EB;
}

@media (max-width: 767px) {
    .kfpr-stats-card > .elementor-container > .elementor-column:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid #E5E7EB;
    }
    
    .kfpr-stats-number {
        font-size: 36px !important;
    }
}

/* ================================
   6. Scholarship Section
   ================================ */
.kfpr-scholarship-bg {
    position: relative;
}

.kfpr-scholarship-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?q=80&w=2600&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    mix-blend-mode: multiply;
    z-index: 0;
}

.kfpr-scholarship-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--kfpr-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Scholarship card corner decoration */
.kfpr-scholarship-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 128px;
    height: 128px;
    background: rgba(0, 52, 120, 0.05);
    border-radius: 0 0 0 100%;
    pointer-events: none;
}

/* Section label style */
.kfpr-section-label {
    color: var(--kfpr-accent) !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
}

.kfpr-section-label-primary {
    color: var(--kfpr-primary) !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
}

/* ================================
   7. Testimonial Slider Overrides
   ================================ */
.kfpr-testimonials .elementor-testimonial__text {
    font-style: italic;
    font-size: 18px !important;
    line-height: 1.8 !important;
    color: #374151 !important;
}

.kfpr-testimonials .elementor-testimonial__name {
    font-weight: 700 !important;
    font-size: 18px !important;
    color: #111827 !important;
}

.kfpr-testimonials .elementor-testimonial__title {
    color: var(--kfpr-primary) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
}

.kfpr-testimonials .elementor-testimonial__image img {
    border: 4px solid white !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Slider navigation buttons */
.kfpr-testimonials .elementor-swiper-button {
    width: 48px !important;
    height: 48px !important;
    border: 2px solid #E5E7EB !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: var(--kfpr-text-muted) !important;
    transition: all 0.3s ease !important;
}

.kfpr-testimonials .elementor-swiper-button:hover {
    background: var(--kfpr-primary) !important;
    border-color: var(--kfpr-primary) !important;
    color: white !important;
}

/* ================================
   8. Mission & Organization Cards
   ================================ */
.kfpr-mission-card,
.kfpr-org-card {
    background: var(--kfpr-surface);
    border-radius: var(--kfpr-radius-lg);
    box-shadow: var(--kfpr-shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    height: 100%;
}

.kfpr-mission-card:hover,
.kfpr-org-card:hover {
    box-shadow: var(--kfpr-shadow-card-hover);
}

/* Card top gradient bars */
.kfpr-gradient-bar-blue {
    height: 8px;
    background: linear-gradient(to right, var(--kfpr-primary), #60A5FA);
}

.kfpr-gradient-bar-red {
    height: 8px;
    background: linear-gradient(to right, var(--kfpr-accent), #F87171);
}

/* Verified quote box */
.kfpr-verified-quote {
    background: var(--kfpr-bg-light);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--kfpr-accent);
}

/* Image hover zoom */
.kfpr-img-zoom {
    overflow: hidden;
    border-radius: var(--kfpr-radius-lg);
}

.kfpr-img-zoom img {
    transition: transform 0.7s ease !important;
}

.kfpr-img-zoom:hover img {
    transform: scale(1.05);
}

/* Korean pattern background */
.kfpr-korean-pattern-bg {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23003478' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ================================
   9. Donation CTA Section
   ================================ */
.kfpr-donate-cta {
    position: relative;
    overflow: hidden;
}

.kfpr-donate-cta .elementor-background-overlay {
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.8),
        rgba(15, 23, 42, 0.6),
        rgba(15, 23, 42, 0.9)
    ) !important;
}

.kfpr-donate-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 52, 120, 0.2);
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

/* Donate button style */
.kfpr-btn-donate .elementor-button {
    background-color: var(--kfpr-accent) !important;
    border-radius: 9999px !important;
    padding: 20px 40px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 15px -3px rgba(198, 12, 48, 0.3) !important;
    transition: all 0.3s ease !important;
}

.kfpr-btn-donate .elementor-button:hover {
    background-color: #B91C1C !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 25px -5px rgba(198, 12, 48, 0.4) !important;
}

/* Scholarship CTA button */
.kfpr-btn-scholarship .elementor-button {
    background-color: var(--kfpr-accent) !important;
    border-radius: 12px !important;
    padding: 16px 24px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    width: 100%;
    box-shadow: 0 10px 15px -3px rgba(198, 12, 48, 0.3) !important;
    transition: all 0.3s ease !important;
}

.kfpr-btn-scholarship .elementor-button:hover {
    background-color: #B91C1C !important;
    transform: translateY(-4px) !important;
}

/* Outline button */
.kfpr-btn-outline .elementor-button {
    background: transparent !important;
    border: 2px solid var(--kfpr-primary) !important;
    color: var(--kfpr-primary) !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}

.kfpr-btn-outline .elementor-button:hover {
    background: var(--kfpr-primary) !important;
    color: white !important;
}

/* ================================
   10. Core Values Cards
   ================================ */
.kfpr-value-card {
    padding: 32px;
    border-radius: var(--kfpr-radius-lg);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(229, 231, 235, 0.5);
    box-shadow: var(--kfpr-shadow-card);
    transition: all 0.3s ease;
}

.kfpr-value-card:hover {
    background: white;
    border-color: #D1D5DB;
    box-shadow: var(--kfpr-shadow-card-hover);
}

/* Value icon containers */
.kfpr-value-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--kfpr-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

.kfpr-value-card:hover .kfpr-value-icon {
    transform: scale(1.1);
}

.kfpr-value-icon--blue {
    background: rgba(219, 234, 254, 0.8);
    color: var(--kfpr-primary);
}

.kfpr-value-icon--indigo {
    background: rgba(224, 231, 255, 0.8);
    color: #4F46E5;
}

.kfpr-value-icon--red {
    background: rgba(254, 226, 226, 0.8);
    color: var(--kfpr-accent);
}

.kfpr-value-icon--orange {
    background: rgba(255, 237, 213, 0.8);
    color: #EA580C;
}

/* ================================
   11. News/Journal Cards
   ================================ */
.kfpr-news-card {
    background: var(--kfpr-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--kfpr-shadow-card);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.kfpr-news-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.kfpr-news-card .kfpr-news-img {
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.kfpr-news-card .kfpr-news-img img {
    transition: transform 0.7s ease;
}

.kfpr-news-card:hover .kfpr-news-img img {
    transform: scale(1.05);
}

/* Category badges */
.kfpr-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    color: white;
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
}

.kfpr-badge--culture { background: var(--kfpr-primary); }
.kfpr-badge--event { background: var(--kfpr-accent); }
.kfpr-badge--philanthropy { background: #4F46E5; }

/* News read more underline effect */
.kfpr-read-more {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    transition: text-decoration-color 0.3s ease;
    font-weight: 700;
}

.kfpr-news-card:hover .kfpr-read-more {
    text-decoration-color: var(--kfpr-primary);
}

/* ================================
   12. Gradient Divider
   ================================ */
.kfpr-gradient-divider {
    width: 96px;
    height: 6px;
    background: linear-gradient(to right, var(--kfpr-primary), var(--kfpr-accent));
    border-radius: 999px;
    margin: 0 auto 24px;
}

/* ================================
   13. Section Heading Styles
   ================================ */
.kfpr-heading-serif {
    font-family: 'Noto Serif KR', serif !important;
    font-weight: 800 !important;
    color: var(--kfpr-secondary) !important;
}

/* ================================
   14. Language Switcher (Fixed)
   ================================ */
.kfpr-lang-switcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #E5E7EB;
    z-index: 9999;
    cursor: pointer;
    transition: background 0.2s;
}

.kfpr-lang-switcher:hover {
    background: #F9FAFB;
}

/* ================================
   15. Elementor Posts Widget Overrides
   ================================ */
.kfpr-posts .elementor-post {
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: box-shadow 0.3s ease !important;
}

.kfpr-posts .elementor-post:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}

.kfpr-posts .elementor-post__thumbnail img {
    transition: transform 0.7s ease !important;
}

.kfpr-posts .elementor-post:hover .elementor-post__thumbnail img {
    transform: scale(1.05) !important;
}

.kfpr-posts .elementor-post__title {
    font-weight: 700 !important;
    font-size: 20px !important;
    transition: color 0.3s ease !important;
}

.kfpr-posts .elementor-post:hover .elementor-post__title a {
    color: var(--kfpr-primary) !important;
}

/* ================================
   16. Blocksy Header Overrides
   ================================ */
/* Sticky header subtle shadow */
header[data-sticky="yes"] {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

/* Donate button in header */
.kfpr-header-donate a {
    background: var(--kfpr-primary) !important;
    color: white !important;
    border-radius: 9999px !important;
    padding: 10px 24px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 52, 120, 0.3) !important;
    transition: all 0.3s ease !important;
}

.kfpr-header-donate a:hover {
    background: var(--kfpr-primary-light) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 52, 120, 0.4) !important;
    transform: translateY(-2px);
}

/* ================================
   17. Responsive Adjustments
   ================================ */
@media (max-width: 1024px) {
    .kfpr-stats-bar {
        margin-top: -48px !important;
    }
}

@media (max-width: 767px) {
    .kfpr-hero {
        min-height: 500px !important;
    }
    
    .kfpr-stats-bar {
        margin-top: -32px !important;
        padding: 0 16px;
    }
    
    .kfpr-stats-number {
        font-size: 32px !important;
    }
    
    .kfpr-heading-serif {
        font-size: 30px !important;
    }
    
    .kfpr-donate-cta .elementor-widget-heading .elementor-heading-title {
        font-size: 30px !important;
    }
}

/* ================================
   18. Smooth Animations
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kfpr-animate-in {
    animation: fadeInUp 0.8s ease-out;
}

/* Intersection Observer trigger class */
.kfpr-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.kfpr-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   19. Elementor Typography Overrides
   ================================ */
/* 엘레멘터 기본 텍스트 (본문, 버튼 등): Noto Sans KR 강제 적용 */
.elementor-widget-text-editor,
.elementor-widget-text-editor p,
.elementor-button,
.elementor-button-text,
.elementor-icon-box-description,
.elementor-image-box-description,
.elementor-testimonial-wrapper .elementor-testimonial-content,
.elementor-testimonial-wrapper .elementor-testimonial-title,
.elementor-post__excerpt,
.elementor-post__excerpt p,
.elementor-post__read-more {
    font-family: 'Noto Sans KR', sans-serif !important;
}

/* 엘레멘터 제목 텍스트 (헤딩, 그리드 타이틀 등 공통): Noto Serif KR 강제 적용 */
h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.elementor-widget-heading .elementor-heading-title,
.elementor-icon-box-title,
.elementor-icon-box-title a,
.elementor-image-box-title,
.elementor-image-box-title a,
.elementor-testimonial-wrapper .elementor-testimonial-name,
.elementor-post__title,
.elementor-post__title a,
.kfpr-heading-serif,
.kfpr-heading-serif .elementor-heading-title {
    font-family: 'Noto Serif KR', serif !important;
}

/* ================================
   20. Blocksy Menu & Global Theme Overrides
   ================================ */
/* 전체 링크 기본 색상 강제 지정 (Global Link Colors) */
a {
    color: var(--kfpr-primary);
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: var(--kfpr-primary-light);
}

/* 엘레멘터 제목 및 그리드 썸네일 등의 특정 링크는 상속 또는 개별 디자인 유지 */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.elementor-heading-title a,
.elementor-post__title a {
    color: inherit;
}

/* Blocksy 메인 헤더 메뉴 스타일 강제 지정 */
.ct-menu-link {
    font-family: 'Noto Sans KR', sans-serif !important;
    font-weight: 600 !important;
    color: var(--kfpr-text) !important;
    transition: color 0.3s ease !important;
}

.ct-menu-link:hover,
.current-menu-item > .ct-menu-link {
    color: var(--kfpr-primary) !important;
}

/* 서브메뉴 링크 컬러 강제 지정 (화이트) */
.sub-menu .ct-menu-link {
    color: #ffffff !important;
}

.sub-menu .ct-menu-link:hover,
.sub-menu .current-menu-item > .ct-menu-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* 서브메뉴 아이콘(화살표 등) 색상도 텍스트 속성(화이트)과 일치 */
.sub-menu .ct-icon {
    fill: #ffffff !important;
}
.sub-menu .ct-menu-link:hover .ct-icon,
.sub-menu .current-menu-item > .ct-menu-link .ct-icon {
    fill: rgba(255, 255, 255, 0.8) !important;
}

/* 헤더 검색 버튼 및 아이콘 스타일 */
.ct-header-search .ct-icon,
.ct-toggle-dropdown-desktop .ct-icon {
    fill: var(--kfpr-text) !important;
    transition: fill 0.3s ease !important;
}

.ct-header-search:hover .ct-icon,
.ct-menu-link:hover .ct-icon,
.current-menu-item > .ct-menu-link .ct-icon {
    fill: var(--kfpr-primary) !important;
}

