.custom-grid-container {
    display: grid;
    gap: 20px;
    padding: 20px 0;
    /* grid-auto-rows is now set dynamically via inline style */
}

.grid-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* background color is now set dynamically via inline style */
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.banner-item {
    position: relative;
    padding: 0;
}

.banner-link {
    display: block;
    width: 100%;
    height: 100%;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    /* background color is inherited from parent .grid-item */
}

.banner-placeholder h3 {
    margin: 0 0 10px 0;
    /* color is now set dynamically via inline style */
}

.banner-placeholder p {
    margin: 0;
    /* color is now set dynamically via inline style */
}

.rss-item {
    padding: 20px;
    /* background color is now set dynamically via inline style */
    overflow-y: auto;
}

.rss-item h3 {
    margin-top: 0;
    /* color is now set dynamically via inline style */
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 10px;
}

.rss-content {
    margin-top: 10px;
}

.rss-entry {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.rss-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rss-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.rss-title a {
    /* color is now set dynamically via inline style */
    text-decoration: none;
}

.rss-title a:hover {
    text-decoration: underline;
}

.rss-description {
    font-size: 0.9em;
    /* color is now set dynamically via inline style */
    margin-bottom: 5px;
}

.rss-date {
    font-size: 0.8em;
    /* color and opacity are now set dynamically via inline style */
}

/* Embed Item Styles */
.embed-item {
    padding: 0;
    overflow: hidden;
}

.embed-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.embed-title {
    margin: 0;
    padding: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-size: 1.1em;
}

.embed-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.embed-content iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.embed-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
}

.embed-placeholder h3 {
    margin: 0 0 10px 0;
}

.embed-placeholder p {
    margin: 0;
}

/* WhatsApp Item Styles */
.whatsapp-item {
    padding: 0;
}

.whatsapp-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-link:hover {
    transform: scale(1.02);
}

.whatsapp-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
}

.whatsapp-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    color: #25D366;
}

.whatsapp-icon svg {
    width: 100%;
    height: 100%;
}

.whatsapp-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
}

.whatsapp-cta {
    margin: 5px 0 0 0;
    font-size: 0.9em;
    opacity: 0.8;
}

.whatsapp-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
}

.whatsapp-placeholder h3 {
    margin: 0 0 10px 0;
}

.whatsapp-placeholder p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-grid-container {
        grid-template-columns: 1fr !important;
    }

    .grid-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
    
    .whatsapp-icon {
        width: 60px;
        height: 60px;
    }
}
