/**
 * Resources Page Styles
 * Portfolio Website by Amr Farag
 * Matches home.css and portfolio.css design system
 */

/* ==================== CSS VARIABLES ==================== */
:root {
    --dark: #0A0E1A;
    --dark-light: #1E2637;
    --primary: #FF9500;
    --primary-hover: #FFB340;
    --text: #FFFFFF;
    --text-light: #E5E5E5;
    --text-gray: #94A3B8;
    --border: rgba(255, 255, 255, 0.1);
    --border-primary: rgba(255, 149, 0, 0.4);
}

/* ==================== RESOURCES HERO SECTION ==================== */

.resources-hero-section {
    background: linear-gradient(135deg, 
        #0F1624 0%, 
        #1a2332 25%,
        #0d1520 50%,
        #1f2937 75%,
        #0F1624 100%
    );
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
    min-height: 60vh;
}

.resources-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 149, 0, 0.08) 0%, transparent 70%);
    z-index: 1;
}

.resources-hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 149, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 149, 0, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: 1;
    opacity: 0.6;
}

.resources-hero-section .container {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.resources-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: rgba(255, 149, 0, 0.06);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 149, 0, 0.4);
    border-radius: 50px;
    margin-bottom: 30px;
    box-shadow: 
        0 0 25px rgba(255, 149, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: fadeIn 0.8s ease-out;
}

.resources-badge span {
    color: #FF9500;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.resources-hero-title {
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
    color: #FFFFFF;
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

.resources-hero-title .text-primary {
    color: #FF9500;
}

.resources-hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: #E5E5E5;
    max-width: 700px;
    margin: 0 auto 40px;
    animation: fadeIn 0.8s ease-out 0.4s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== SEARCH BAR ==================== */

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 24px 18px 60px;
    background: rgba(30, 38, 55, 0.7);
    border: 2px solid rgba(255, 149, 0, 0.3);
    border-radius: 50px;
    color: #FFFFFF;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.search-input::placeholder {
    color: #94A3B8;
}

.search-input:focus {
    outline: none;
    border-color: #FF9500;
    background: rgba(30, 38, 55, 0.85);
    box-shadow: 
        0 8px 25px rgba(255, 149, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: #FF9500;
    font-size: 20px;
    pointer-events: none;
}

/* ==================== RESOURCES SECTION ==================== */

.resources-section {
    background: linear-gradient(180deg, 
        rgba(15, 22, 36, 0.95) 0%, 
        rgba(25, 32, 48, 0.98) 50%,
        rgba(15, 22, 36, 0.95) 100%
    );
    position: relative;
    padding: 65px 0;
    overflow: hidden;
}

.resources-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 149, 0, 0.06) 0%, transparent 70%);
    z-index: 1;
}

.section-container {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    width: 90%;
    margin: 0 auto;
}

/* ==================== CATEGORY FILTERS ==================== */

.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
}

.category-btn {
    padding: 14px 30px;
    background: rgba(30, 38, 55, 0.6);
    border: 2px solid rgba(255, 149, 0, 0.3);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    color: #E5E5E5;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
    display: inline-block;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.category-btn:hover {
    border-color: #FF9500;
    background: rgba(255, 149, 0, 0.15);
    transform: translateY(-3px);
    color: #FF9500;
    box-shadow: 
        0 8px 25px rgba(255, 149, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.category-btn.active {
    background: linear-gradient(135deg, #FF9500, #FFB340);
    border-color: #FF9500;
    color: #0A0E1A;
    box-shadow: 
        0 10px 30px rgba(255, 149, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ==================== RESOURCES GRID ==================== */

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.resource-card {
    background: linear-gradient(
        135deg,
        rgba(255, 149, 0, 0.05) 0%,
        rgba(30, 38, 55, 0.7) 50%,
        rgba(255, 149, 0, 0.05) 100%
    );
    border: 2px solid rgba(255, 149, 0, 0.3);
    border-radius: 25px;
    padding: 35px 30px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(15px);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 10px 35px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(255, 149, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    border-top: 2px solid rgba(255, 149, 0, 0.4);
    border-right: 2px solid rgba(255, 149, 0, 0.4);
    transition: all 0.3s ease;
}

.resource-card:hover {
    border-color: #FF9500;
    background: linear-gradient(
        135deg,
        rgba(255, 149, 0, 0.08) 0%,
        rgba(30, 38, 55, 0.85) 50%,
        rgba(255, 149, 0, 0.08) 100%
    );
    transform: translateY(-8px);
    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.5),
        0 0 45px rgba(255, 149, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.resource-card:hover::before {
    border-color: #FF9500;
}

.resource-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.resource-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff9500c2, #FFB340);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 
        0 8px 20px rgba(255, 149, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.resource-badge {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-free {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-email {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-premium {
    background: rgba(168, 85, 247, 0.2);
    color: #A855F7;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.resource-title {
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 15px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.resource-card:hover .resource-title {
    color: #FF9500;
}

.resource-description {
    font-size: 15px;
    line-height: 1.7;
    color: #D0D0D0;
    flex: 1;
    margin-bottom: 20px;
}

.resource-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #94A3B8;
    margin-bottom: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 149, 0, 0.2);
}

.resource-btn {
    width: 100%;
    padding: 16px 28px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resources-section .btn-primary {
    background: rgb(255, 174, 53, 0.2);
    color: #ff9b0d;
    border: 2px solid rgb(255, 156, 13, 0.4)
}

.resources-section .btn-primary:hover {
    background: rgb(255, 174, 53, 0.2);
    border-color: #ff9b0d;
    transform: translateY(-3px);

}

.btn-secondary {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
    border: 2px solid rgba(59, 130, 246, 0.4);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3B82F6;
    transform: translateY(-3px);
}

.btn-disabled {
    background: rgba(75, 85, 99, 0.3);
    color: #9CA3AF;
    border: 2px solid rgba(75, 85, 99, 0.4);
    cursor: not-allowed;
}

/* Premium Button */
.btn-premium {
        background: rgb(168 85 247 / 20%);
        color: #A855F7;
        border: 2px solid rgba(168, 85, 247, 0.4);

}

.btn-premium:hover {
    background: rgb(168, 85, 247, 0.3);
    border-color: #A855F7;
    transform: translateY(-3px);

}

/* View Link Button Style */
.resource-btn.btn-link {
    background: rgb(255, 174, 53, 0.2);
    color: #ff9b0d;
    border: 2px solid rgb(255, 156, 13, 0.4);
}

.resource-btn.btn-link:hover {
    border-color: #ff9b0d;
    transform: translateY(-3px);
    background: rgb(255, 174, 53, 0.2);

}
/* ==================== EMPTY STATE ==================== */

.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 20px rgba(255, 149, 0, 0.3));
}

.empty-title {
    font-size: 32px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 18px;
    color: #94A3B8;
}

/* ==================== MODAL STYLES ==================== */

.modal {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 149, 0, 0.12) 0%, rgba(10, 14, 26, 0.98) 60%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: linear-gradient(135deg, #0f162442 0%, #1a233294 25%, #0d152057 50%, #1f293780 75%, #0f162400 100%);
    border: 2px solid rgba(255, 149, 0, 0.4);
    border-radius: 25px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 149, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 30px;
    border-bottom: 1px solid rgba(255, 149, 0, 0.2);
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 24px;
    font-weight: 800;
    color: #FFFFFF;
}

.modal-close {
    position: absolute;  /* ADD THIS */
    top: 20px;           /* ADD THIS */
    right: 20px;         /* ADD THIS */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 149, 0, 0.1);
    border: 2px solid rgba(255, 149, 0, 0.3);
    color: #FF9500;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;        /* ADD THIS - ensures it's on top */
}

.modal-close:hover {
    background: rgba(255, 149, 0, 0.2);
    border-color: #FF9500;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 30px;
    border-top: 1px solid rgba(255, 149, 0, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* ==================== FORM STYLES ==================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(18, 25, 38, 0.7);
    border: 2px solid rgba(255, 149, 0, 0.3);
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.form-input::placeholder {
    color: #64748B;
}

.form-input:focus {
    outline: none;
    border-color: #FF9500;
    background: rgba(255, 149, 0, 0.08);
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(255, 149, 0, 0.2);
}

.text-content {
    background: rgba(10, 14, 26, 0.5);
    border: 1px solid rgba(255, 149, 0, 0.2);
    border-radius: 12px;
    padding: 25px;
    color: #D0D0D0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

/* ==================== CTA SECTION ==================== */

.cta-section {
    background: linear-gradient(180deg, 
        rgba(15, 22, 36, 0.95) 0%, 
        rgba(18, 25, 38, 0.98) 50%,
        rgba(15, 22, 36, 0.95) 100%
    );
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 149, 0, 0.3);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .resources-hero-section {
        padding: 120px 0 80px;
    }
    
    .resources-hero-title {
        font-size: 42px;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .category-filters {
        gap: 10px;
    }
    
    .category-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .resources-hero-section {
        padding: 80px 0 60px;
        min-height: 35vh;
    }
    
    .resources-hero-title {
        font-size: 36px;
    }
    
    .search-input {
        padding: 16px 20px 16px 50px;
        font-size: 15px;
    }
    
    .resource-card {
        padding: 25px 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}

/* ==================== ACCESSIBILITY ==================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PASSWORD MODAL STYLES - ORANGE THEME
   Matches website design system
   ============================================ */
:root {
    --primary-orange: #FF9500;
    --primary-orange-hover: #E68600;
    --modal-navy: #151B3D;
    --modal-dark: #0A0E1A;
}
#passwordModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255, 149, 0, 0.12) 0%, rgba(10, 14, 26, 0.98) 60%);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
#passwordModal.active {
    display: flex;
}
#passwordModal .modal-dialog {
    background: linear-gradient(135deg, #0f162442 0%, #1a233294 25%, #0d152057 50%, #1f293780 75%, #0f162400 100%);
    border: 2px solid rgba(255, 149, 0, 0.4);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 0px 67px rgb(255 149 0 / 18%);
    position: relative;
}

#passwordModal .modal-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 149, 0, 0.15);
}


#passwordModal .modal-header h3 {
    color: #FFFFFF;
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 16px 0;
    letter-spacing: 0.5px;
}

#passwordModal .modal-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

#passwordModal .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.2);
    color: var(--primary-orange);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}
#passwordModal .modal-close:hover {
    background: rgba(255, 149, 0, 0.2);
    border-color: rgba(255, 149, 0, 0.4);
    transform: rotate(90deg);
}
#passwordModal .modal-body {
    margin-bottom: 0;
}
#passwordModal .form-group {
    margin-bottom: 28px;
}
#passwordModal .form-label {
    color: #FFFFFF;
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
#passwordModal input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 149, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
#passwordModal input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
#passwordModal input[type="password"]:focus {
    border-color: var(--primary-orange);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.1);
}
#passwordModal .submit-btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: 15px;
    border: none;
    background: var(--primary-orange);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 149, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
#passwordModal .submit-btn i {
    font-size: 18px;
}
#passwordModal .submit-btn:hover {
    background: var(--primary-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 149, 0, 0.4);
}
#passwordModal .submit-btn:active {
    transform: translateY(0);
}
@media (max-width: 600px) {
    #passwordModal .modal-dialog {
        padding: 36px 24px;
        margin: 0 16px;
    }
    
    #passwordModal .modal-header h3 {
        font-size: 20px;
    }
    
    #passwordModal .modal-header p {
        font-size: 18px;
    }
    
    #passwordModal .modal-close {
        width: 40px;
        height: 40px;
        top: 16px;
        right: 16px;
    }
}