/* Hijri Gregorian Converter Tool - Mobile & Desktop Optimized */

.hijri-converter-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Header Styles */
.hijri-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.hijri-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main Card */
.hijri-main-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Toggle Buttons */
.hijri-toggle-section {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.hijri-toggle-btn {
    flex: 1;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 160px;
    position: relative;
    overflow: hidden;
}

.hijri-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hijri-toggle-btn:hover::before {
    left: 100%;
}

.hijri-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.hijri-toggle-btn.hijri-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* Conversion Container */
.hijri-conversion-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 32px;
}

.hijri-section-title {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 24px 0;
    text-align: center;
    position: relative;
}

.hijri-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Date Input Grids */
.hijri-date-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.hijri-input-field {
    display: flex;
    flex-direction: column;
}

.hijri-field-label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hijri-select-field {
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQgNkw4IDEwTDEyIDYiIHN0cm9rZT0iIzZDNzU3RCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.hijri-select-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* Result Display */
.hijri-result-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 16px;
    padding: 32px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hijri-result-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(102, 126, 234, 0.05) 50%, transparent 100%);
    pointer-events: none;
}

.hijri-result-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hijri-converted-date {
    font-size: 26px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hijri-converted-day {
    font-size: 18px;
    color: #6c757d;
    font-weight: 500;
}

/* Convert Button */
.hijri-convert-section {
    text-align: center;
}

.hijri-convert-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 36px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.hijri-convert-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hijri-convert-btn:hover::before {
    left: 100%;
}

.hijri-convert-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.hijri-convert-btn:active {
    transform: translateY(-1px);
}

/* Important Dates Section */
.hijri-important-dates-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hijri-dates-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 32px 0;
    text-align: center;
    position: relative;
}

.hijri-dates-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.hijri-dates-grid {
    display: grid;
    gap: 20px;
}

.hijri-date-card {
    border-left: 5px solid #667eea;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0 12px 12px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hijri-date-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.hijri-date-card:hover::before {
    width: 8px;
}

.hijri-date-card:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateX(6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.hijri-date-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.hijri-date-card p {
    font-size: 16px;
    color: #495057;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.hijri-date-card small {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .hijri-converter-wrapper {
        padding: 16px;
        margin: 0 8px;
    }
    
    .hijri-title {
        font-size: 24px;
    }
    
    .hijri-header {
        padding: 20px;
    }
    
    .hijri-main-card {
        padding: 24px;
    }
    
    .hijri-toggle-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .hijri-toggle-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .hijri-conversion-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .hijri-date-inputs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .hijri-select-field {
        padding: 16px;
        font-size: 16px;
    }
    
    .hijri-converted-date {
        font-size: 22px;
    }
    
    .hijri-result-display {
        padding: 24px;
        min-height: 120px;
    }
    
    .hijri-convert-btn {
        width: 100%;
        padding: 16px;
        font-size: 16px;
    }
    
    .hijri-important-dates-section {
        padding: 24px;
    }
    
    .hijri-dates-title {
        font-size: 22px;
    }
    
    .hijri-date-card {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .hijri-converter-wrapper {
        padding: 12px;
        margin: 0 4px;
    }
    
    .hijri-title {
        font-size: 20px;
    }
    
    .hijri-header {
        padding: 16px;
    }
    
    .hijri-main-card {
        padding: 16px;
    }
    
    .hijri-section-title {
        font-size: 18px;
    }
    
    .hijri-converted-date {
        font-size: 20px;
    }
    
    .hijri-converted-day {
        font-size: 16px;
    }
    
    .hijri-result-display {
        padding: 20px;
    }
    
    .hijri-important-dates-section {
        padding: 16px;
    }
    
    .hijri-dates-title {
        font-size: 20px;
    }
    
    .hijri-date-card h3 {
        font-size: 18px;
    }
}

/* Performance optimizations */
.hijri-converter-wrapper * {
    box-sizing: border-box;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hijri-toggle-btn,
    .hijri-select-field,
    .hijri-convert-btn,
    .hijri-date-card {
        transition: none;
    }
}