/* Duaa Pages Styles */

/* Import color variables from main site */
:root {
    /* Colors - Light Mode Default */
    --primary-color: #d4af37;
    --primary-dark: #b8941f;
    --secondary-color: #ffffff;
    --accent-color: #f4d03f;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-primary: #f5f5f0;
    --bg-secondary: #e8e8e0;
    --border-color: #d0d0c8;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 60px rgba(0,0,0,0.15);
    
    /* Typography */
    --font-primary: 'Cairo', sans-serif;
    --font-secondary: 'Amiri', serif;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --border-color: #404040;
    --secondary-color: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --shadow-hover: 0 20px 60px rgba(0,0,0,0.4);
}

/* Light Mode Variables */
[data-theme="light"] {
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-primary: #f5f5f0;
    --bg-secondary: #e8e8e0;
    --border-color: #d0d0c8;
    --secondary-color: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 60px rgba(0,0,0,0.15);
}

.duaa-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 4rem 0 3rem;
    text-align: center;
    color: white;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.duaa-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    z-index: 0;
}

.duaa-hero .container {
    position: relative;
    z-index: 1;
}

.duaa-hero .hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.duaa-hero h1 {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.duaa-hero p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.categories-section {
    padding: 3rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.category-card h3 {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Duaa Content Page */
.duaa-content {
    padding: 2rem 0 3rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin-bottom: 2rem;
}

.back-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.duaa-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.duaa-item {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 2rem;
    border-right: 4px solid var(--primary-color);
    transition: var(--transition);
}

.duaa-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(-5px);
}

.duaa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.duaa-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.duaa-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: var(--bg-primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-primary);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.duaa-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    line-height: 2.5;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 10px;
}

.duaa-translation {
    background: rgba(212, 175, 55, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border-right: 3px solid var(--primary-color);
    margin-bottom: 1rem;
}

.duaa-translation p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

.duaa-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.duaa-source i {
    color: var(--primary-color);
}

.counter-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.counter-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 60px;
    text-align: center;
}

.counter-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.counter-btn:active {
    transform: scale(0.95);
}

.reset-btn {
    background: var(--text-secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.reset-btn:hover {
    background: var(--primary-color);
}

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .duaa-hero h1 {
        font-size: 2rem;
    }
    
    .duaa-hero .hero-icon {
        font-size: 3rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .duaa-arabic {
        font-size: 1.5rem;
        line-height: 2.2;
    }
    
    .duaa-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .duaa-hero {
        padding: 3rem 0 2rem;
    }
    
    .duaa-hero h1 {
        font-size: 1.6rem;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .duaa-arabic {
        font-size: 1.3rem;
        padding: 1rem;
    }
}

/* Touch-friendly styles for tablets and iPads */
@media (hover: none) and (pointer: coarse) {
    /* Make all interactive elements touch-friendly */
    .category-card,
    .duaa-item,
    .action-btn,
    .counter-btn,
    .reset-btn,
    .back-button {
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }
    
    /* Larger touch targets */
    .action-btn,
    .counter-btn,
    .reset-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.8rem;
    }
    
    /* Better spacing for touch */
    .duaa-actions {
        gap: 1rem;
    }
    
    .counter-section {
        gap: 1rem;
    }
    
    /* Remove hover effects, use active states */
    .category-card:active {
        transform: scale(0.98);
        box-shadow: var(--shadow);
    }
    
    .action-btn:active,
    .counter-btn:active,
    .reset-btn:active {
        transform: scale(0.95);
        background: var(--primary-color);
        color: white;
    }
}

/* Tablet specific (iPad, etc) */
@media (min-width: 768px) and (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .duaa-hero h1 {
        font-size: 2.2rem;
    }
    
    .duaa-arabic {
        font-size: 1.6rem;
        line-height: 2.5;
    }
    
    .category-card {
        padding: 2.5rem;
    }
    
    .category-icon {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }
}

/* iPad Pro and large tablets */
@media (min-width: 1024px) and (max-width: 1366px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .container {
        max-width: 1200px;
    }
}

/* Landscape orientation for tablets */
@media (orientation: landscape) and (min-width: 768px) and (max-width: 1024px) {
    .duaa-hero {
        padding: 3rem 0 2.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .category-card,
    .duaa-item,
    .action-btn {
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
        -webkit-touch-callout: none;
    }
    
    /* Prevent text selection on double tap */
    .duaa-arabic,
    .category-card h3 {
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Allow text selection only when needed */
    .duaa-arabic.selectable {
        -webkit-user-select: text;
        user-select: text;
    }
}

/* Smooth scrolling for touch devices */
@media (hover: none) {
    html {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .duaa-list {
        -webkit-overflow-scrolling: touch;
    }
}

/* Light mode specific hero styling */
[data-theme="light"] .duaa-hero {
    background: linear-gradient(135deg, #c19a6b, #0b3d2c);
    opacity: 0.95;
}

/* Dark mode specific hero styling */
[data-theme="dark"] .duaa-hero {
    background: linear-gradient(135deg, #9d7e2f, #082d1f);
    color: #e0e0e0;
}
