/* ========== HOME PAGE SPECIFIC STYLES ========== */

/* Home Page Styles */
.timetable-overlap {
    margin-top: -80px;
    position: relative;
    z-index: 1000;
}

.timetable-box {
    border-radius: 20px;
    border: none;
    max-width: 90%;
    margin: 0 auto;
    padding: 30px;
}

.big-div {
    padding: 80px 0;
}

.big-div h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 300;
    font-size: 3rem;
}

.big-div p {
    font-size: 1.4rem;
    color: #7f8c8d;
    max-width: 800px;
    margin: 0 auto;
}

/* Modern Homepage Timetable Styles */
.timetable-overlap {
    margin-top: -100px;
    position: relative;
    z-index: 100;
}

.timetable-box {
    border-radius: 25px;
    border: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    backdrop-filter: blur(10px);
    max-width: 80%;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

/* FIXED: Modern Prayer Card with proper sizing */
.modern-prayer-card {
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    overflow: visible;
    position: relative;
    min-height: 280px;
    width: 100%; /* Ensure full width */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.modern-prayer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
}

.modern-prayer-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.modern-prayer-card.fajr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modern-prayer-card.dhuhr {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    min-height: 320px; /* Make Dhuhr taller */
}

.modern-prayer-card.asr {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.modern-prayer-card.maghrib {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.modern-prayer-card.isha {
    background: linear-gradient(135deg, #a8c0ff 0%, #3f2b96 100%);
}

.prayer-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.prayer-name {
    font-size: 1.2rem;
    font-weight: 600; /* Increased from 400 for better visibility */
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.prayer-time-adhan {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.prayer-time-jamaah {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.prayer-divider {
    width: 50px;
    height: 4px;
    background: rgba(255,255,255,0.4);
    margin: 1rem auto;
    border-radius: 2px;
}

/* FIXED: Next Prayer Highlight - Better visibility */
.next-prayer-highlight {
    border: 4px solid #ffd700 !important;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6) !important;
    position: relative;
    transform: scale(1.05);
    z-index: 2;
}

.next-prayer-badge {
    position: absolute;
    top: -12px;
    right: -12px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333 !important;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 900; /* Increased from 700 for better visibility */
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    border: 2px solid #fff;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
    min-width: 70px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Current Time Display */
.current-time-display {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.1);
}

.current-time {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 0.5rem;
}

.current-date {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Card hover effects */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Carousel adjustments */
.carousel-item video,
.carousel-item img {
    max-height: 600px;
    object-fit: cover;
}

/* Social Media Buttons for Homepage */
.social-btn {
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    font-size: 1.1rem;
}

.social-btn.facebook {
    background: linear-gradient(135deg, #1877f2, #0d5cb6);
}

.social-btn.instagram {
    background: linear-gradient(135deg, #e4405f, #c13584);
}

.social-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    color: white;
}

/* ========== FIXED RESPONSIVE BREAKPOINTS ========== */

/* Grid column fixes */
.col-lg-2, .col-md-4, .col-sm-6 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    box-sizing: border-box;
}

/* Ensure prayer cards fill their containers */
.row .col-lg-2 .modern-prayer-card,
.row .col-md-4 .modern-prayer-card,
.row .col-sm-6 .modern-prayer-card {
    width: 100%;
    max-width: 100%;
    flex: 1;
}

/* iPad and Tablets (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .timetable-box {
        max-width: 95%; /* Increased from 100% to prevent stretching */
        padding: 30px;
    }
    
    .modern-prayer-card {
        min-height: 250px;
        width: 100%;
    }
    
    .prayer-icon {
        font-size: 3.5rem;
    }
    
    .prayer-time-jamaah {
        font-size: 2rem;
    }
    
    .prayer-name {
        font-size: 1.4rem;
    }
    
    .next-prayer-badge {
        top: -10px;
        right: -10px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* FIXED: Desktop and Laptops (1200px - 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .timetable-box {
        max-width: 90%; /* Optimal width for standard desktops */
        padding: 40px;
    }
    
    .modern-prayer-card {
        min-height: 300px;
        width: 100%;
    }
    
    /* Enhanced prayer card sizes for desktop */
    .prayer-icon {
        font-size: 3.8rem;
    }
    
    .prayer-time-jamaah {
        font-size: 2.3rem;
    }
    
    .prayer-name {
        font-size: 1.5rem;
    }
    
    .modern-prayer-card.dhuhr {
        min-height: 320px;
    }
}

/* FIXED: 2K Screens and larger (1920px and above) */
@media (min-width: 1920px) {
    .timetable-box {
        max-width: 85%; /* Increased from 70% for better utilization */
        padding: 50px;
    }
    
    .modern-prayer-card {
        min-height: 320px;
        width: 100%;
    }
    
    .prayer-icon {
        font-size: 4.5rem;
    }
    
    .prayer-time-jamaah {
        font-size: 2.5rem;
    }
    
    .prayer-name {
        font-size: 1.6rem;
    }
    
    .current-time {
        font-size: 4rem;
    }
    
    .big-div h1 {
        font-size: 4rem;
    }
    
    .big-div p {
        font-size: 1.8rem;
    }
    
    /* FIXED: Even more visible NEXT badge on 2K screens */
    .next-prayer-badge {
        top: -15px;
        right: -15px;
        padding: 12px 22px;
        font-size: 1.1rem;
        min-width: 80px;
        border: 3px solid #fff;
        box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    }
}

/* 4K Screens and ultra-wide (2560px and above) */
@media (min-width: 2560px) {
    .timetable-box {
        max-width: 80%;
        padding: 60px;
    }
    
    .modern-prayer-card {
        min-height: 350px;
        width: 100%;
    }
    
    .prayer-icon {
        font-size: 5rem;
    }
    
    .prayer-time-jamaah {
        font-size: 2.8rem;
    }
    
    .prayer-name {
        font-size: 1.8rem;
    }
    
    .next-prayer-badge {
        top: -18px;
        right: -18px;
        padding: 14px 24px;
        font-size: 1.2rem;
    }
    
    .current-time {
        font-size: 4.5rem;
    }
}

/* Enhanced column spacing */
@media (min-width: 1200px) {
    .row.justify-content-center.g-3 {
        gap: 2rem !important;
    }
}

/* Mobile Responsive Design */
@media (max-width: 767px) {
    .timetable-overlap {
        margin-top: -40px;
    }
    
    .timetable-box {
        max-width: 95%;
        padding: 20px;
        margin: 0 10px;
    }
    
    .prayer-time-jamaah {
        font-size: 1.8rem; /* Increased from 1.5rem for better readability */
    }
    
    .prayer-icon {
        font-size: 2.8rem; /* Increased from 2.5rem */
    }
    
    .current-time {
        font-size: 2.5rem; /* Increased from 2rem */
    }
    
    .modern-prayer-card {
        min-height: 220px; /* Increased from 200px */
        width: 100%;
    }
    
    .prayer-name {
        font-size: 1.3rem; /* Increased from 1.2rem */
    }
    
    /* FIXED: Mobile NEXT badge adjustment */
    .next-prayer-badge {
        top: -8px;
        right: -8px;
        padding: 8px 14px; /* Increased from 6px 12px */
        font-size: 0.8rem;
        min-width: 65px; /* Increased from 60px */
    }
}

/* Extra small devices */
@media (max-width: 575px) {
    .modern-prayer-card {
        min-height: 200px;
        width: 100%;
    }
    
    .next-prayer-badge {
        top: -6px;
        right: -6px;
        padding: 6px 12px; /* Increased from 4px 10px */
        font-size: 0.75rem; /* Increased from 0.7rem */
        min-width: 55px; /* Increased from 50px */
    }
    
    .prayer-time-jamaah {
        font-size: 1.6rem;
    }
    
    .prayer-icon {
        font-size: 2.5rem;
    }
}

/* Ensure proper grid behavior */
.row.justify-content-center {
    width: 100%;
    margin: 0 auto;
}

/* Remove any min-width restrictions that might cause issues */
.modern-prayer-card {
    min-width: auto !important; /* Remove fixed min-width */
}

/* Enhanced Dhuhr card styling */
.modern-prayer-card.dhuhr .prayer-icon {
    font-size: 4rem; /* Larger icon for Dhuhr */
    margin-bottom: 2rem;
}

.modern-prayer-card.dhuhr .prayer-name {
    font-size: 1.6rem; /* Larger name for Dhuhr */
    margin-bottom: 1.2rem;
}

.modern-prayer-card.dhuhr .prayer-time-adhan {
    font-size: 1.2rem; /* Larger adhan time for Dhuhr */
    margin-bottom: 0.8rem;
}

.modern-prayer-card.dhuhr .prayer-time-jamaah {
    font-size: 2.5rem; /* Larger jamaah time for Dhuhr */
    font-weight: 900;
}

.modern-prayer-card.dhuhr .prayer-divider {
    width: 70px; /* Wider divider for Dhuhr */
    height: 5px; /* Thicker divider for Dhuhr */
    margin: 1.5rem auto;
}

.modern-prayer-card.dhuhr .card-body {
    padding: 2.5rem 1.5rem !important; /* More padding for Dhuhr */
}