body {
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar-brand {
    font-weight: bold;
    color: #FFFFFF;
}

.nav-link {
    transition: color 0.3s ease;
}

.card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.deity-profile {
    padding: 2rem 0;
}

.profile-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-image {
    flex: 0 0 300px;
}

.profile-image img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.profile-info .description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.associated-stotras {
    margin-top: 2rem;
}

.associated-stotras h2 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.stotra-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.stotra-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stotra-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: var(--primary-lighter);
    color: white;
}

.stotra-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
    }
}

.audio-player {
    padding: 20px;
}

main {
    flex: 1;
}

.footer {
    margin-top: auto;
    padding: 1rem 0;
    transition: background-color 0.3s ease;
}

.footer:hover {
    background-color: var(--primary-darker);
}

.navbar {
    transition: background-color 0.3s ease;
}

.navbar:hover {
    background-color: var(--primary-darker);
}

@media (max-width: 768px) {
    .card-img-top {
        height: 150px;
    }

    .deity-profile img {
        max-height: 300px;
    }
}

/* Blockquote styling */
blockquote {
    text-align: center;
    font-style: italic;
    font-size: 1rem;
    margin: 0.5rem auto;
    max-width: 800px;
    padding: 0.5rem;
}

/* Add decorative elements */
.deity-gallery h1::before,
.deity-gallery h1::after {
    content: "🕉";
    margin: 0 10px;
}

.filter-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
    transition: box-shadow 0.3s ease;
}

.filter-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.stotras-container {
    padding: 2rem 0;
}

.filter-section {
    max-width: 1200px;
    margin: 0 auto;
}

.stotra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.stotra-card {
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stotra-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stotra-card-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-color);
}

.stotra-icon {
    flex: 0 0 50px;
    height: 50px;
    margin-right: 1rem;
}

.stotra-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.stotra-card:hover .stotra-card-image img {
    transform: scale(1.05);
}

.stotra-card-content {
    padding: 1.5rem;
}

.stotra-card-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.deity-name {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.languages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.language-tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background: var(--primary-lighter);
    color: white;
    border-radius: 0.25rem;
}
.weekly-deities {
    padding: 2rem 1rem;
    background: #f8f9fa;
}

.welcome-message {
    min-height: 2em;
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: opacity 0.5s ease;
}

.day-deities {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.day-deity {
    text-align: center;
    width: 140px;
}

.weekly-deity-card {
    margin-top: 0.5rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.weekly-deity-card:hover {
    transform: translateY(-5px);
}

.weekly-deity-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.weekly-deity-card img:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.weekly-deity-card p {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.weekly-deity-card.empty img {
    opacity: 0.5;
}

/* Loading states */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

body.loading {
    overflow: hidden;
}

/* Error handling */
.error-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

.was-validated .form-control:invalid ~ .error-feedback {
    display: block;
}

/* Image handling */
.img-wrapper {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-wrapper img {
    max-width: 100%;
    height: auto;
    opacity: 1;
    transition: opacity 0.3s;
}

.img-wrapper img.loading {
    opacity: 0;
}

.img-wrapper .fallback {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    text-align: center;
}

.img-wrapper img[src=""] + .fallback,
.img-wrapper img:not([src]) + .fallback {
    display: block;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    width: 100%;
}

.masonry-item {
    width: 100%;
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 577px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .masonry-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .masonry-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.deity-card {
    position: relative;
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.deity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    padding-top: 75%; /* Reduced from 100% to 75% */
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.deity-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 0.5rem;
    text-align: center;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        columns: 2 200px;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        columns: 1;
    }
}