/* بسم الله الرحمن الرحيم
// Bismillah Hir Rahman Nir Raheem
// In the name of Allah, The Most Gracious, The Most Merciful
*/

/* Tech Switcher Component - Specific to tech-switcher.html */
.tech-switcher {
    background: white;
    /*border-radius: var(--radius-2xl);*/
    /*padding: var(--spacing-2xl);*/
    /* margin: var(--spacing-2xl) 0;*/
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.1);
    transition: all 300ms;
    max-width: 100%;
    /* Ensure it doesn't overflow */
    overflow: hidden;
    /* Prevent content overflow */
    border-radius: 1rem;
    /* Smaller corners */
    padding: 1.25rem;
    /* Reduced padding */
    margin: 0.5rem;
    /* Reduced margin */
}

.tech-switcher:hover {
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.15);
}

/* Big Tech and Ethics */
.bigtech {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-semibold);
    color: #111827;
    margin-bottom: var(--spacing);
    display: flex;
    align-items: center;
    gap: var(--spacing);
}

.bigtech .cross {
    color: var(--color-error);
    font-size: var(--text-3xl);
}

.ethics {
    font-size: var(--text-xl);
    color: var(--color-success);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing);
    display: flex;
    align-items: center;
    gap: var(--spacing);
}

.ethics .check {
    color: var(--color-success);
    font-size: var(--text-2xl);
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing);
    margin: calc(var(--spacing)*1.5) 0;
}

.feature {
    background: rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(8px);
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    text-align: center;
    font-weight: 500;
    color: #374151;
    transition: all 300ms;
}

.feature:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* Warning */
.warning {
    background: rgba(216, 0, 39, 0.1);
    padding: var(--spacing);
    border-radius: var(--radius-lg);
    margin: var(--spacing) 0;
    border-left: 4px solid var(--color-error);
    backdrop-filter: blur(8px);
}

/* Switch Steps */
.switch-steps {
    background: rgba(139, 92, 246, 0.1);
    padding: calc(var(--spacing)*1.5);
    border-radius: var(--radius-lg);
    margin: calc(var(--spacing)*1.5) 0;
    backdrop-filter: blur(8px);
}

.switch-step {
    display: flex;
    align-items: center;
    gap: var(--spacing);
    margin-bottom: var(--spacing);
}

.switch-step:last-child {
    margin-bottom: 0;
}

.step-number {
    background: linear-gradient(to right, var(--color-purple-500), var(--color-pink-500));
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: var(--text-sm);
    flex-shrink: 0;
}

/* Counter */
.counter {
    text-align: center;
    background: linear-gradient(to right, var(--color-purple-500), var(--color-pink-500));
    color: white;
    padding: var(--spacing);
    border-radius: var(--radius-lg);
    margin: var(--spacing) 0;
    font-size: var(--text-lg);
    font-weight: 600;
    backdrop-filter: blur(8px);
}

/* Buttons */
.btn-switch {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem !important;
    font-size: var(--text-sm) !important;
    font-weight: 600;
    color: white;
    background: linear-gradient(to right, #8b5cf6, #f43f5e) !important;
    border-radius: 9999px;
    transition: all 300ms;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-switch:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.btn-share {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem !important;
    font-size: var(--text-sm) !important;
    font-weight: 600;
    color: white;
    background: linear-gradient(to right, #10b981, #059669) !important;
    border-radius: 9999px;
    transition: all 300ms;
    border: none;
    cursor: pointer;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}


/* Success Message */
.success-message {
    background: linear-gradient(135deg, rgba(46, 139, 87, 0.2) 0%, rgba(255, 215, 0, 0.2) 100%);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    display: none;
}

.success-message.active {
    display: block;
    animation: slideInUp 0.6s ease-out;
}

.success-message h2 {
    color: #2E8B57;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #2E8B57, transparent);
    margin: 2rem 0;
}

.reminder {
    background: rgba(255, 215, 0, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    text-align: center;
    font-style: italic;
    color: #000000;
}

.build-better {
    background: #2E8B57;
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    text-align: center;
}

.build-better h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.text-palestine {
    color: #000000;
}

/* Progress Tracker Styles */
.progress-tracker {
    background: rgba(139, 92, 246, 0.1);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    transition: all 300ms;
}

.progress-step.completed {
    background: rgba(16, 185, 129, 0.2);
    border-left: 4px solid #10b981;
}

.step-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.step-text {
    font-weight: 500;
    color: #374151;
}

/* Community Impact */
.community-impact {
    background: linear-gradient(to right, var(--color-purple-500), var(--color-pink-500));
    color: white;
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin: 1rem 0;
    text-align: center;
    font-weight: 600;
}

/* Button Variations */
.btn-outline {
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: #6b7280;
    background: transparent;
    border: 2px solid #d1d5db;
    border-radius: 9999px;
    transition: all 300ms;
    cursor: pointer;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #9ca3af;
}

/* Tech Switcher Section - Use proper visibility */
#techSwitcherSection.hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

#techSwitcherSection:not(.hidden) {
    display: block !important;
    opacity: 1;
    visibility: visible;
    animation: fadeInUp 0.6s ease-out;
}

#techSwitcherSection {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Ensure smooth transitions */
.tech-switcher,
#techSwitcherSection {
    transition: all 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Responsive Design for Tech Switcher */
@media (max-width: 768px) {
    .tech-switcher {
        padding: 1.5rem;
    }

    .bigtech {
        font-size: 1.25rem;
    }

    .ethics {
        font-size: 1.125rem;
    }

    .features {
        grid-template-columns: 1fr;
    }
}

/* Button Container */
.flex.gap-4.justify-center.mt-6 {
    display: flex !important;
    gap: 1rem !important;
    justify-content: center !important;
    margin-top: 1.5rem !important;
    flex-wrap: wrap;
}

#techSwitcherSection:not(.hidden) .flex.gap-4.justify-center.mt-6 {
    display: flex !important;
}

/* Ethical Alternatives Section */
/* Alternative Cards - Smaller version */
.alternative-card {
    background: white;
    border-radius: 0.75rem;
    /* Smaller corners */
    padding: 0.75rem;
    /* Much smaller padding */
    margin: 0.25rem;
    /* Smaller margin */
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.1);
    transition: all 300ms;
    max-width: 100%;
    overflow: hidden;
}

.alternative-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.15);
}

.alternative-card .bigtech {
    font-size: 0.938rem;
    /* Smaller font */
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.alternative-card .bigtech .cross {
    color: #ef4444;
    font-size: 1rem;
}

.alternative-card .ethics {
    font-size: 0.813rem;
    /* Smaller font */
    color: #10b981;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.alternative-card .ethics .check {
    color: #10b981;
    font-size: 0.938rem;
}

.alternative-card .btn-explore {
    padding: 0.375rem 0.75rem;
    /* Smaller button padding */
    font-size: 0.688rem;
    /* Smaller button font */
    max-width: 90px;
    /* Smaller button width */
}

/* Mobile optimization for alternative cards */
@media (max-width: 640px) {
    .alternative-card {
        padding: 0.625rem;
        margin: 0.125rem;
        border-radius: 0.625rem;
        max-width: 280px;
        /* This limits the width to 280px */

    }

    @media (max-width: 768px) {
        .alternative-card {
            max-width: 280px;
            /* This limits the width to 280px */
            margin: 0.1rem;
            border-radius: 0.625rem;
        }
    }


    .alternative-card .bigtech {
        font-size: 0.875rem;
    }

    .alternative-card .bigtech .cross {
        font-size: 0.938rem;
    }

    .alternative-card .ethics {
        font-size: 0.75rem;
    }

    .alternative-card .ethics .check {
        font-size: 0.875rem;
    }

    .alternative-card .btn-explore {
        padding: 0.313rem 0.625rem;
        font-size: 0.625rem;
        max-width: 80px;
    }
}


/* PWA-style explore button - UPDATED */
.btn-explore {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    /* Smaller padding */
    border-radius: 0.75rem;
    /* Smaller corners */
    font-weight: 600;
    font-size: 0.813rem;
    /* Smaller font */
    border: none;
    cursor: pointer;
    transition: all 200ms ease;
    box-shadow: 0 4px 15px 0 rgba(31, 38, 135, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    /* Full width for mobile */
    max-width: 120px;
    /* Max width to prevent stretching */
}

.btn-explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(31, 38, 135, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-explore:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px 0 rgba(31, 38, 135, 0.2);
}

/* Mobile optimization for explore button */
@media (max-width: 640px) {
    .btn-explore {
        padding: 0.438rem 0.875rem;
        font-size: 0.75rem;
        max-width: 100px;
    }
}


/* Search Results */
.search-results {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 24px !important;
    align-items: start !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

.card {
    border-radius: var(--radius-2xl);
    background-color: white;
    padding: 24px;
    transition: box-shadow 300ms ease;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1;
    max-width: 350px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.card:hover {
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.15);
}

.company-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    aspect-ratio: 1 / 1;
    max-width: 350px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.company-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.company-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: var(--text-sm);
    color: white;
    flex-shrink: 0;
    object-fit: cover;
}

.company-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.company-details h3 {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
}

.company-details p {
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-category {
    font-size: var(--text-xs);
    color: #6b7280;
    margin-bottom: 6px;
}

.company-main-category {
    font-size: var(--text-sm);
    color: #374151;
    font-weight: 500;
    margin-bottom: 8px;
}

.company-sub-category {
    font-size: var(--text-xs);
    color: #6b7280;
    opacity: 0.8;
}

.risk-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}

.boycott {
    background: #fecdd3;
    color: #be123c;
}

.monitor {
    background: #fef3c7;
    color: #d97706;
}

.alternative {
    background: #d1fae5;
    color: #065f46;
}

.company-description {
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.company-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    flex-shrink: 0;
}

.company-info-tags {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #6b7280;
    font-size: 12px;
    flex-wrap: wrap;
}


.search-bar {
    position: relative;
    max-width: 56rem;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-2xl);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(var(--blur-xl));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: var(--text-sm);
    transition: all 300ms;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    border-color: #8b5cf6;
}

.search-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.75rem;
    background: linear-gradient(to right, #8b5cf6, #f43f5e);
    border-radius: var(--radius-xl);
    transition: all 300ms;
}

.search-button:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.search-button svg {
    width: calc(var(--spacing)*5);
    height: calc(var(--spacing)*5);
    color: white;
}

.search-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

.search-category {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(var(--blur-sm));
    color: rgba(255, 255, 255, 0.8);
    transition: all 300ms;
    white-space: nowrap;
}

.search-category:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-category.active {
    background: rgba(139, 92, 246, 0.2);
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .search-results {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    .search-results {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 16px !important;
        padding: 16px !important;
    }
}

@media (max-width: 480px) {
    .search-results {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 12px !important;
    }

    .card,
    .company-card {
        max-width: 100%;
    }

    .company-logo {
        width: 40px;
        height: 40px;
    }

    .company-details h3 {
        font-size: 16px;
    }
}


/* Button Styles */
.btn-primary {
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: white;
    background: linear-gradient(to right, #8b5cf6, #f43f5e);
    border-radius: 9999px;
    transition: all 300ms;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: #374151;
    background-color: white;
    border: 2px solid #d1d5db;
    border-radius: 9999px;
    transition: all 300ms;
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}


/* Animation */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* [TIMESTAMP: 2026-02-18 09:15 AM] - LOGO CONTAINER & PILL OVERFLOW FIXES */
/* [PURPOSE: Add logo system and fix pill overflow without breaking existing functionality] */
/* [SAFETY: Non-breaking additions only] */
/* [ZIKR: "The sincere servant of Allah is like a gentle breeze that does no harm to anyone, but brings comfort and relief to all who encounter it." - Imam al-Ghazali] */

/* Logo Container Styles */
.logo-container {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.company-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

/* Enhanced Pill Overflow Fix */
.risk-badge {
    padding: 6px 16px !important;
    font-size: 11px !important;
    border-radius: 9999px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 120px !important;
    flex-shrink: 0 !important;
    word-break: break-word !important;
    hyphens: auto !important;
}

/* Enhanced Mobile Support for Pills */
@media (min-width: 1024px) {
    .risk-badge {
        padding: 8px 20px !important;
        font-size: 14px !important;
        max-width: 140px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .risk-badge {
        padding: 6px 16px !important;
        font-size: 12px !important;
        max-width: 120px !important;
    }
}

@media (max-width: 414px) {
    .risk-badge {
        max-width: 100px !important;
        padding: 5px 14px !important;
        font-size: 11px !important;
        min-width: auto !important;
    }
}

@media (max-width: 390px) {
    .risk-badge {
        max-width: 90px !important;
        padding: 5px 12px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 375px) {
    .risk-badge {
        max-width: 80px !important;
        padding: 4px 12px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 360px) {
    .risk-badge {
        max-width: 75px !important;
        padding: 4px 10px !important;
        font-size: 9px !important;
    }
}

@media (max-width: 320px) {
    .risk-badge {
        max-width: 70px !important;
        padding: 3px 8px !important;
        font-size: 9px !important;
        text-overflow: clip !important;
    }
}

/* Enhanced company info layout for better spacing */
@media (max-width: 414px) {
    .company-info {
        gap: 8px !important;
    }

    .company-details h3 {
        font-size: 16px !important;
    }

    .company-card-header {
        margin-bottom: 12px !important;
    }
}