﻿/* ========================================
   Sticky Sidebar - Desktop Design
   ======================================== */

.sticky-sidebar {
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 70px;
    align-self: flex-start;
    padding: 12px;
    
    /* Fix for scroll vibration: promotes element to its own layer */
    transform: translateZ(0);
    /* Ensure no conflicting transition on the container itself */
    transition: none; 
    will-change: auto;
    z-index: 99;
}

/* ========================================
   Shared Card Styles (Desktop & Mobile)
   ======================================== */

.sidebar-card,
.mobile-quick-info-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
    background: #fff;
}

.sidebar-card-header,
.mobile-card-header {
    background: linear-gradient(135deg, #38506B 0%, #2c4158 100%);
    color: white;
    padding: 12px 14px;
}

.sidebar-card-header h5,
.mobile-card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card-header h5 i,
.mobile-card-header h5 i {
    font-size: 0.95rem;
}

.sidebar-card-body,
.mobile-card-body {
    padding: 12px;
}

/* ========================================
   Info Grid (Desktop & Mobile Shared)
   ======================================== */

.info-grid,
.mobile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.info-grid-item,
.mobile-grid-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.info-grid-item:hover,
.mobile-grid-item:hover {
    background: #e9ecef;
}

.info-grid-item.full-width,
.mobile-grid-item.full-width {
    grid-column: 1 / -1;
}

/* ========================================
   Mobile Info Grid
   ======================================== */

.mobile-info-grid {
    gap: 8px;
}

.mobile-grid-item {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mobile-grid-item.with-icon {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.mobile-grid-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #38506B 0%, #4a6a8a 100%);
    color: white;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.mobile-grid-content {
    flex: 1;
    min-width: 0;
}

/* ========================================
   Mobile Info List (For Contact Section)
   ======================================== */

.mobile-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-info-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    gap: 12px;
}

.mobile-info-item:last-child {
    margin-bottom: 0;
}

.mobile-info-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #38506B 0%, #4a6a8a 100%);
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.mobile-info-content {
    flex: 1;
    min-width: 0;
}

/* ========================================
   Labels, Icons & Values - Color Distinction
   ======================================== */

.info-grid-label,
.mobile-info-label,
.mobile-grid-label {
    font-size: 0.75rem;
    color: #5a6c7d;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.info-grid-label i,
.mobile-info-label i,
.mobile-grid-label i {
    font-size: 0.8rem;
    color: #38506B;
}

.info-grid-value,
.mobile-info-value,
.mobile-grid-value {
    font-size: 0.95rem;
    color: #1a1a2e;
    font-weight: 500;
    line-height: 1.4;
}

/* ========================================
   Badges
   ======================================== */

.badge-sm {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-gender { background: #667eea; color: white; }
.badge-residence { background: #11998e; color: white; }
.badge-sponsor { background: #e056fd; color: white; }
.badge-ownership { background: #4facfe; color: white; }
.badge-special { background: #fa709a; color: white; }

/* Level Badges */
.level-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.level-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    background: #38506B;
    color: white;
}

/* ========================================
   Expandable Sections
   ======================================== */

.expandable-wrapper {
    width: 100%;
}

.expandable-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.expandable-toggle {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #38506B;
    color: white;
    font-size: 0.7rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.expandable-toggle.expanded {
    transform: rotate(45deg);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}

.expandable-content.show {
    max-height: 300px;
    margin-top: 8px;
}

.level-detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid #38506B;
    padding-left: 10px;
}

.level-detail-item {
    padding: 4px 0;
    font-size: 0.88rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-name {
    color: #5a6c7d;
    font-size: 0.85rem;
}

.level-value {
    font-weight: 500;
    color: #1a1a2e;
    font-size: 0.85rem;
}

/* ========================================
   Contact Links - Clickable Styling
   ======================================== */

.contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.contact-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    padding: 8px 12px;
    background: #e8f4fc;
    border-radius: 6px;
    border-left: 3px solid #0066cc;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-link:hover {
    background: #d0e8f7;
    color: #004999;
    text-decoration: none;
}

.contact-link i {
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Mobile Contact with Call Button */
.mobile-contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mobile-contact-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 12px;
    background: #e8f4fc;
    border-radius: 6px;
    border-left: 3px solid #0066cc;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.mobile-contact-link:hover,
.mobile-contact-link:active {
    background: #d0e8f7;
    color: #004999;
    text-decoration: none;
}

.mobile-contact-link i {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.mobile-contact-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Call & Copy Buttons */
.call-btn {
    padding: 10px 14px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.call-btn:hover,
.call-btn:active {
    background: #218838;
    color: white;
    text-decoration: none;
}

.copy-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #e9ecef;
    border: none;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #38506B;
    color: white;
}

.copy-btn i {
    font-size: 0.8rem;
}

.copy-btn-mobile {
    padding: 10px 12px;
    font-size: 0.8rem;
    width: auto;
    height: auto;
}

.copy-btn-mobile i {
    font-size: 0.8rem;
}

/* ========================================
   Social Icons
   ======================================== */

.social-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 12px 0 8px;
    border-top: 1px solid #e9ecef;
    margin-top: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: transform 0.15s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-icon:hover,
.social-icon:active {
    transform: scale(1.1);
    color: white;
}

.social-whatsapp { background: #25D366; }
.social-website { background: #17a2b8; }
.social-facebook { background: #1877F2; }
.social-twitter { background: #000; }
.social-linkedin { background: #0A66C2; }
.social-instagram { background: linear-gradient(135deg, #E4405F, #833AB4); }
.social-youtube { background: #FF0000; }
.social-tiktok { background: #000; }

.x-text { font-weight: 700; font-size: 0.9rem; }

/* ========================================
   Action Buttons
   ======================================== */

.sidebar-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-top: 12px;
}

.sidebar-btn-primary {
    background: #38506B;
    color: white;
    border: none;
}

.sidebar-btn-primary:hover {
    background: #2c4158;
    color: white;
}

.sidebar-btn-outline {
    background: transparent;
    border: 1.5px solid #38506B;
    color: #38506B;
}

.sidebar-btn-outline:hover {
    background: #38506B;
    color: white;
}

/* ========================================
   Event/Session Cards
   ======================================== */

.event-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.date-box {
    min-width: 54px;
    text-align: center;
    padding: 10px 12px;
    border-radius: 8px;
    color: white;
    flex-shrink: 0;
}

.date-box-event { background: linear-gradient(135deg, #28a745, #1e7e34); }
.date-box-session { background: linear-gradient(135deg, #007bff, #0056b3); }
.date-box-empty { background: #dee2e6; color: #6c757d; }

.date-month {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-day {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.1;
}

.event-info {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
    line-height: 1.3;
}

.event-meta {
    font-size: 0.85rem;
    color: #5a6c7d;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}

.event-meta i {
    font-size: 0.75rem;
    color: #38506B;
}

.event-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin: 12px 0;
}

/* Divider */
.sidebar-divider {
    height: 1px;
    background: #e9ecef;
    margin: 12px 0;
}

/* ========================================
   Desktop Responsive
   ======================================== */

@media (max-height: 800px) {
    .sticky-sidebar {
        top: 60px;
        padding: 10px;
    }
    
    .sidebar-card {
        margin-bottom: 10px;
    }
    
    .sidebar-card-header {
        padding: 10px 12px;
    }
    
    .sidebar-card-header h5 {
        font-size: 0.95rem;
    }
    
    .sidebar-card-body {
        padding: 10px;
    }
    
    .info-grid {
        gap: 6px;
    }
    
    .info-grid-item {
        padding: 8px;
    }
    
    .info-grid-label {
        font-size: 0.72rem;
    }
    
    .info-grid-value {
        font-size: 0.88rem;
    }
    
    .event-img {
        height: 80px;
    }
}

@media (max-height: 700px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .event-img {
        display: none;
    }
    
    .info-grid-label {
        font-size: 0.7rem;
    }
    
    .info-grid-value {
        font-size: 0.85rem;
    }
}

/* ========================================
   Mobile Specific Styles
   ======================================== */

@media (max-width: 768px) {
    .mobile-quick-info-card {
        margin: 8px 0;
        border-radius: 12px;
    }
    
    .mobile-card-header {
        padding: 14px 16px;
    }
    
    .mobile-card-header h5 {
        font-size: 1.05rem;
        justify-content: center;
    }
    
    .mobile-card-body {
        padding: 14px;
    }
    
    .mobile-info-grid {
        gap: 8px;
    }
    
    .mobile-grid-item {
        padding: 10px 12px;
    }
    
    .mobile-grid-label {
        font-size: 0.75rem;
    }
    
    .mobile-grid-value {
        font-size: 0.95rem;
    }
    
    .mobile-info-item {
        padding: 12px;
    }
    
    .mobile-info-label {
        font-size: 0.75rem;
    }
    
    .mobile-info-value {
        font-size: 0.95rem;
    }
    
    .mobile-contact-link {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .call-btn {
        padding: 10px 14px;
        font-size: 0.88rem;
    }
    
    .social-icon {
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
    
    .sidebar-btn {
        padding: 12px 16px;
        font-size: 0.92rem;
    }
    
    .level-badge {
        font-size: 0.8rem;
        padding: 4px 9px;
    }
    
    .badge-sm {
        font-size: 0.82rem;
        padding: 4px 9px;
    }
}

/* Very small screens - stack to single column */
@media (max-width: 380px) {
    .mobile-info-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-contact-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mobile-contact-link {
        width: 100%;
    }
    
    .call-btn {
        width: 100%;
        justify-content: center;
    }
}
