/* ============================================
   School Cooperation Page — Specific Styles
   ============================================ */

/* ── Hero Header ── */
.cooperation-hero {
    background: linear-gradient(135deg, rgba(255, 240, 243, 0.94), rgba(234, 245, 237, 0.92), rgba(250, 246, 240, 0.96)), 
                url('../images/carousel_1.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-main);
    padding: 95px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(42, 127, 64, 0.06);
}

.cooperation-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 10% 20%, rgba(216, 75, 111, 0.04) 0%, rgba(42, 127, 64, 0.04) 50%, transparent 100%);
    pointer-events: none;
}

.cooperation-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 18px;
    letter-spacing: 1px;
}

.cooperation-hero .lead {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.8;
}

/* ── Main Content Spacing ── */
.cooperation-section {
    background-color: #FAF6F0; /* Clean Warm Rice-White/Cream */
    padding: 60px 0;
}

/* ── Breadcrumbs ── */
.breadcrumb-section {
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(42, 127, 64, 0.08);
    padding-bottom: 15px;
}

.breadcrumb-path a {
    color: var(--text-muted);
    transition: var(--transition-base);
}

.breadcrumb-path a:hover {
    color: #D84B6F; /* Soft Pink accent */
}

.breadcrumb-path span {
    color: var(--dark-blue);
    font-weight: 500;
}

/* ── Category Titles ── */
.category-title {
    font-size: 2.1rem;
    font-weight: 700;
    background: linear-gradient(120deg, var(--dark-blue) 40%, #D84B6F 70%, #2A7F40 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 35px;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, #D84B6F, #2A7F40); /* Elegant Pink to Green gradient line */
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(216, 75, 111, 0.2);
}

/* ── School Cards Styling ── */
.school-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px; /* Slightly rounder for a modern look */
    padding: 32px;
    height: 100%;
    box-shadow: 0 10px 30px rgba(42, 127, 64, 0.01);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.school-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: var(--transition-base);
}

/* Dynamic Hover Effects based on Class Type (Pink for B, Light Green for C) */
.school-card:has(.class-b-badge):hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(216, 75, 111, 0.12); /* Dynamic Pink Glow Shadow */
    border-color: rgba(216, 75, 111, 0.25);
}

.school-card:has(.class-b-badge):hover::before {
    background: #D84B6F; /* Pink accent bar */
}

.school-card:has(.class-b-badge) .school-name i {
    background-color: #FFF0F2;
    color: #D84B6F;
    border: 1px solid rgba(216, 75, 111, 0.15);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.05rem;
    transition: var(--transition-base);
}

.school-card:has(.class-b-badge):hover .school-name i {
    background-color: #D84B6F;
    color: var(--white);
    transform: scale(1.1) rotate(5deg);
    border-color: #D84B6F;
    box-shadow: 0 4px 10px rgba(216, 75, 111, 0.2);
}

.school-card:has(.class-c-badge):hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(42, 127, 64, 0.12); /* Dynamic Green Glow Shadow */
    border-color: rgba(42, 127, 64, 0.25);
}

.school-card:has(.class-c-badge):hover::before {
    background: #2A7F40; /* Light Green accent bar */
}

.school-card:has(.class-c-badge) .school-name i {
    background-color: #EAF5EC;
    color: #2A7F40;
    border: 1px solid rgba(42, 127, 64, 0.15);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.05rem;
    transition: var(--transition-base);
}

.school-card:has(.class-c-badge):hover .school-name i {
    background-color: #2A7F40;
    color: var(--white);
    transform: scale(1.1) rotate(5deg);
    border-color: #2A7F40;
    box-shadow: 0 4px 10px rgba(42, 127, 64, 0.2);
}

/* Project Class Badges */
.project-badge-container {
    margin-bottom: 20px;
}

.project-class-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.class-b-badge {
    background-color: #FFF0F2; /* Soft Pink background */
    color: #D84B6F; /* Rose-Pink text */
    border: 1px solid rgba(216, 75, 111, 0.18);
}

.class-c-badge {
    background-color: #EAF5EC; /* Soft Light Green background */
    color: #2A7F40; /* Sage-Green text */
    border: 1px solid rgba(42, 127, 64, 0.18);
}

/* School and Dept names */
.school-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.department-name {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 0;
    font-family: 'Noto Serif TC', serif;
}

/* ── Map Styles (Ported from index.css) ── */
#partner-map-section {
    background-color: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.school-interactive-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(80, 46, 129, 0.2) transparent;
}

.school-interactive-list::-webkit-scrollbar {
    width: 6px;
}

.school-interactive-list::-webkit-scrollbar-thumb {
    background-color: rgba(80, 46, 129, 0.2);
    border-radius: 3px;
}

/* Pulse markers & map styles */
@keyframes pulse-ring-amber {
    0% { transform: scale(0.3); opacity: 1; }
    80%, 100% { opacity: 0; }
}

@keyframes pulse-ring-blue {
    0% { transform: scale(0.3); opacity: 1; }
    80%, 100% { opacity: 0; }
}

.pulse-marker-amber, .pulse-marker-blue {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-marker-amber::before {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-orange);
    animation: pulse-ring-amber 1.8s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
}

.pulse-marker-blue::before {
    content: '';
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #3b82f6;
    animation: pulse-ring-blue 1.8s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
}

.coordinator-dot {
    width: 14px;
    height: 14px;
    background-color: var(--primary-orange);
    border: 2px solid #ffffff;
    border-radius: 50%;
    z-index: 2;
}

.partner-dot {
    width: 10px;
    height: 10px;
    background-color: var(--dark-blue);
    border: 1.5px solid #ffffff;
    border-radius: 50%;
    transition: var(--transition-base);
}

.partner-dot:hover {
    background-color: var(--primary-orange);
    transform: scale(1.2);
}

/* Leaflet Overrides */
.custom-leaflet-popup .leaflet-popup-content-wrapper {
    background: #ffffff;
    color: var(--text-main);
    border-radius: var(--border-radius);
    padding: 2px;
    box-shadow: var(--shadow-md);
    border-top: 3px solid var(--primary-orange);
}

.custom-leaflet-popup .leaflet-popup-tip {
    background: #ffffff;
}

.custom-popup-content .hover-underline:hover {
    text-decoration: underline !important;
}

.custom-map-tooltip {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid var(--dark-blue) !important;
    border-radius: 4px !important;
    padding: 3px 8px !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: var(--dark-blue) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    font-family: 'Noto Sans TC', sans-serif !important;
}

.reset-map-btn {
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-base);
}

/* Overriding Orange Buttons to Deep Vibrant Orange with Crisp White Text */
.btn-orange, 
.reset-map-btn {
    background-color: #f25c05 !important; /* Deep Vibrant Orange */
    color: #ffffff !important; /* High-contrast Crisp White Text */
    font-weight: 600 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(242, 92, 5, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-orange:hover, 
.reset-map-btn:hover {
    background-color: #d44d00 !important; /* Deeper Orange */
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.03) !important;
    box-shadow: 0 8px 20px rgba(242, 92, 5, 0.35) !important;
}

@media (max-width: 991px) {
    #map {
        height: 380px !important;
    }
}

/* ── Cooperative Activities Section ── */
.coop-card {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.coop-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(42, 127, 64, 0.12);
    border-color: rgba(42, 127, 64, 0.15);
}

.coop-card-img-box {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #f7fafc;
}

.coop-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.coop-card:hover .coop-card-img {
    transform: scale(1.06);
}

.coop-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--dark-blue);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.coop-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.coop-card-date {
    font-size: 0.85rem;
    color: #f25c05;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.coop-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
    font-family: 'Noto Serif TC', serif;
}

.coop-card:hover .coop-card-title {
    color: #f25c05;
}

.coop-card-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

