/* Main Layout Wrapper - 3 Column Grid */
.main-layout-wrapper {
    display: grid;
    /* Left Sidebar | Main Content | Right Sidebar */
    grid-template-columns: 220px 1fr 220px;
    gap: 20px;
    max-width: 1800px;
    /* Increased for better 4-card fit */
    margin: 0 auto;
    padding: 0 20px 20px 20px;
    min-height: 80vh;
}

/* Standardized 4-Card Grid Utility */
.card-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    margin-bottom: 40px;
}

@media (max-width: 1400px) {
    .card-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .card-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .card-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Styles */
.sidebar-left,
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-content {
    position: sticky;
    top: 90px;
    /* Stick below header */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Main Content Area */
.content-area {
    min-width: 0;
    /* Prevents grid blowout */
    background: #fff;
    border-radius: 8px;
}

/* Ad Block Styles */
.ad-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    overflow: hidden;
}

.ad-block img {
    max-width: 100%;
    border-radius: 4px;
}

.ad-block h4 {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #333;
}

.ad-block p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.ad-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #adb5bd;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.btn-outline {
    border: 1px solid #667eea;
    color: #667eea;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    display: inline-block;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #667eea;
    color: #fff;
}

/* Specific Promo Styles */
.internal-promo .promo-links {
    list-style: none;
    padding: 0;
    text-align: left;
}

.internal-promo .promo-links li {
    margin-bottom: 8px;
}

.internal-promo .promo-links a {
    color: #555;
    text-decoration: none;
    font-size: 0.95em;
}

.internal-promo .promo-links a:hover {
    color: #667eea;
    padding-left: 5px;
    /* slight movement */
    transition: 0.2s;
}

/* Charity Block Highlight */
.ad-block.charity-highlight {
    background: linear-gradient(135deg, #fff0f1 0%, #ffeef0 100%);
    border-color: #ffdce0;
}

.heart-icon {
    font-size: 24px;
    color: #ff4757;
    margin-bottom: 10px;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    10% {
        transform: scale(1.1);
    }

    20% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

.btn-charity {
    background: #ff4757;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(255, 71, 87, 0.3);
}

.btn-charity:hover {
    background: #ff2e43;
    transform: translateY(-1px);
}

/* Responsive Rules */

/* Tablet: Squeeze sidebars */
@media (max-width: 1200px) {
    .main-layout-wrapper {
        grid-template-columns: 180px 1fr 180px;
    }
}

/* Mobile/Small Tablet: Hide Sidebars (or move to bottom if requested later) */
@media (max-width: 900px) {
    .main-layout-wrapper {
        display: block;
        /* Stack everything */
        padding: 10px;
    }

    .sidebar-left,
    .sidebar-right {
        display: none;
        /* User requested removal on mobile to keep it clean */
    }

    .content-area {
        width: 100%;
    }
}
