/* Adsofttech Extension Showcase - Mobile, Tablet & PC Friendly */
:root {
    --primary-blue: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-green: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --primary-purple: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    --primary-orange: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --primary-red: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ============ MAIN CONTAINER ============ */
.aes-grid-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 0 5px;
    box-sizing: border-box;
}

/* ============ MAIN GRID LAYOUT ============ */
.aes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 10px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
    box-sizing: border-box;
}

.aes-grid-1 { grid-template-columns: repeat(1, 1fr); }
.aes-grid-2 { grid-template-columns: repeat(2, 1fr); }
.aes-grid-3 { grid-template-columns: repeat(3, 1fr); }
.aes-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============ EXTENSION CARD ============ */
.aes-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
    min-height: 520px;
    height: auto;
    align-self: flex-start;
    box-sizing: border-box;
    width: 100%;
}

/* Top color bar */
.aes-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.aes-card[data-color="blue"]::before { background: var(--primary-blue); }
.aes-card[data-color="green"]::before { background: var(--primary-green); }
.aes-card[data-color="purple"]::before { background: var(--primary-purple); }
.aes-card[data-color="orange"]::before { background: var(--primary-orange); }
.aes-card[data-color="red"]::before { background: var(--primary-red); }

.aes-card:hover::before {
    opacity: 1;
}

.aes-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
    border-color: transparent;
}

/* ============ CARD BADGE ============ */
.aes-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--primary-purple);
    color: white;
    padding: 4px 35px;
    font-size: 11px;
    font-weight: 700;
    transform: rotate(45deg);
    letter-spacing: 1px;
    z-index: 2;
}

/* ============ IMAGE SLIDER ============ */
.aes-image-slider {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

/* Slider Wrapper */
.aes-slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Slides Container */
.aes-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

/* Individual Slide */
.aes-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 15px;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Slide Image */
.aes-slide img,
.aes-slider-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
    display: block;
}

.aes-card:hover .aes-slide img,
.aes-card:hover .aes-slider-image {
    transform: scale(1.03);
}

/* Slider Navigation Buttons */
.aes-slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 10px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.aes-image-slider:hover .aes-slider-nav {
    opacity: 1;
    pointer-events: auto;
}

.aes-slider-prev,
.aes-slider-next {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    pointer-events: auto;
    font-weight: bold;
}

.aes-slider-prev:hover,
.aes-slider-next:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

/* Slider Dots */
.aes-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    padding: 5px;
    pointer-events: none;
}

.aes-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.aes-slider-dot.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.aes-slider-dot:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

/* Slide Counter */
.aes-slide-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(2px);
}

/* ============ SINGLE IMAGE (Fallback) ============ */
.aes-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.aes-image img,
.aes-single-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
    display: block;
}

.aes-card:hover .aes-image img,
.aes-card:hover .aes-single-image {
    transform: scale(1.05);
}

/* No Image Placeholder */
.aes-no-image-placeholder {
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* ============ CARD TITLE ============ */
.aes-card-title {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    position: relative;
    padding-bottom: 10px;
    flex-shrink: 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.aes-card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 2px;
    background: var(--primary-blue);
    border-radius: 2px;
    opacity: 0.7;
}

.aes-card[data-color="blue"] .aes-card-title::after { background: var(--primary-blue); }
.aes-card[data-color="green"] .aes-card-title::after { background: var(--primary-green); }
.aes-card[data-color="purple"] .aes-card-title::after { background: var(--primary-purple); }
.aes-card[data-color="orange"] .aes-card-title::after { background: var(--primary-orange); }
.aes-card[data-color="red"] .aes-card-title::after { background: var(--primary-red); }

/* ============ META INFORMATION ============ */
.aes-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    min-height: 30px;
    gap: 8px;
}

.aes-price {
    font-weight: 700;
    color: #10b981;
    font-size: 14px;
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.aes-version {
    color: #94a3b8;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.aes-demo {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid #3b82f6;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: rgba(59, 130, 246, 0.05);
    white-space: nowrap;
}

.aes-demo:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
}

/* ============ FEATURES TOGGLE BUTTON ============ */
.aes-toggle {
    background: var(--primary-blue);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 50px;
    margin: 5px auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    width: 140px;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    min-height: 40px;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

.aes-card[data-color="blue"] .aes-toggle { 
    background: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}
.aes-card[data-color="green"] .aes-toggle { 
    background: var(--primary-green);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.aes-card[data-color="purple"] .aes-toggle { 
    background: var(--primary-purple);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}
.aes-card[data-color="orange"] .aes-toggle { 
    background: var(--primary-orange);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}
.aes-card[data-color="red"] .aes-toggle { 
    background: var(--primary-red);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.aes-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.aes-toggle.active {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    border-bottom: none;
    margin-bottom: 0;
}

/* Toggle Icon */
.aes-toggle-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
    display: inline-block;
    margin-left: 2px;
}

.aes-toggle.active .aes-toggle-icon {
    transform: rotate(180deg);
}

/* ============ FEATURE GROUPS ============ */
.aes-feature-groups {
    display: none;
    margin: 0 0 15px;
    max-height: 0;
    opacity: 0;
    overflow-y: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
    box-sizing: border-box;
}

.aes-feature-groups.show {
    display: block;
    opacity: 1;
    max-height: 500px;
    overflow-y: auto;
    animation: slideDown 0.4s ease-out forwards;
}

.aes-feature-group {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.aes-feature-group:last-child {
    margin-bottom: 0;
}

.aes-feature-group.expanded {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.aes-group-header {
    padding: 12px 15px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.aes-feature-group.expanded .aes-group-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom-color: transparent;
}

.aes-group-header:hover {
    background: #e2e8f0;
}

.aes-feature-group.expanded .aes-group-header:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.aes-group-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 13.5px;
    flex-grow: 1;
    margin-right: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.aes-group-toggle {
    color: #64748b;
    font-size: 10px;
    transition: transform 0.3s ease;
    min-width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.aes-feature-group.expanded .aes-group-toggle {
    color: #3b82f6;
    transform: rotate(180deg);
}

.aes-group-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.aes-feature-group.expanded .aes-group-content {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.aes-group-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aes-group-content li {
    margin-bottom: 10px;
    padding-left: 28px;
    position: relative;
    line-height: 1.5;
    font-size: 13px;
    color: var(--text-light);
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.aes-group-content li:last-child {
    margin-bottom: 0;
}

.aes-group-content li::before {
    content: '✓';
    position: absolute;
    left: 2px;
    top: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 14px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-sizing: border-box;
}

/* Color-specific group headers */
.aes-card[data-color="blue"] .aes-group-header {
    border-left: 3px solid #667eea;
}
.aes-card[data-color="green"] .aes-group-header {
    border-left: 3px solid #10b981;
}
.aes-card[data-color="purple"] .aes-group-header {
    border-left: 3px solid #8b5cf6;
}
.aes-card[data-color="orange"] .aes-group-header {
    border-left: 3px solid #f59e0b;
}
.aes-card[data-color="red"] .aes-group-header {
    border-left: 3px solid #ef4444;
}

/* ============ ACTION BUTTONS ============ */
.aes-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    background: var(--card-bg);
    min-height: 50px;
    align-items: center;
    box-sizing: border-box;
}

/* Fixed button sizes */
.aes-buttons a {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

/* Primary Button */
.aes-btn-primary {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.aes-card[data-color="blue"] .aes-btn-primary { 
    background: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}
.aes-card[data-color="green"] .aes-btn-primary { 
    background: var(--primary-green);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}
.aes-card[data-color="purple"] .aes-btn-primary { 
    background: var(--primary-purple);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}
.aes-card[data-color="orange"] .aes-btn-primary { 
    background: var(--primary-orange);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}
.aes-card[data-color="red"] .aes-btn-primary { 
    background: var(--primary-red);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* Secondary Button */
.aes-btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.aes-card[data-color="blue"] .aes-btn-secondary { 
    color: #667eea; 
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}
.aes-card[data-color="green"] .aes-btn-secondary { 
    color: #10b981; 
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}
.aes-card[data-color="purple"] .aes-btn-secondary { 
    color: #8b5cf6; 
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
}
.aes-card[data-color="orange"] .aes-btn-secondary { 
    color: #f59e0b; 
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}
.aes-card[data-color="red"] .aes-btn-secondary { 
    color: #ef4444; 
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* Success Button */
.aes-btn-success {
    background: var(--primary-green);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

/* Button hover effects */
.aes-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.aes-btn-primary:hover {
    filter: brightness(110%);
}

.aes-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
}

.aes-btn-success:hover {
    filter: brightness(110%);
}

/* ============ NO RESULTS MESSAGE ============ */
.aes-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    color: #64748b;
    font-size: 16px;
    margin: 20px;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered Animation for Cards */
.aes-grid .aes-card:nth-child(1) { animation-delay: 0.1s; }
.aes-grid .aes-card:nth-child(2) { animation-delay: 0.2s; }
.aes-grid .aes-card:nth-child(3) { animation-delay: 0.3s; }
.aes-grid .aes-card:nth-child(4) { animation-delay: 0.4s; }
.aes-grid .aes-card:nth-child(5) { animation-delay: 0.5s; }
.aes-grid .aes-card:nth-child(6) { animation-delay: 0.6s; }

/* ============ CUSTOM SCROLLBARS ============ */
.aes-feature-groups::-webkit-scrollbar,
.aes-group-content::-webkit-scrollbar {
    width: 6px;
}

.aes-feature-groups::-webkit-scrollbar-track,
.aes-group-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.aes-feature-groups::-webkit-scrollbar-thumb,
.aes-group-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.aes-feature-groups::-webkit-scrollbar-thumb:hover,
.aes-group-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============ RESPONSIVE DESIGN ============ */

/* Large Desktop (PC) - 1200px+ */
@media (max-width: 1200px) {
    .aes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 22px;
        padding: 18px 10px;
    }
    
    .aes-feature-groups.show {
        max-height: 450px;
    }
    
    .aes-card {
        min-height: 510px;
        padding: 18px;
    }
}

/* Desktop - 992px to 1199px */
@media (max-width: 992px) {
    .aes-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
        padding: 16px 10px;
    }
    
    .aes-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .aes-card {
        min-height: 500px;
        padding: 16px;
    }
    
    .aes-image-slider,
    .aes-image {
        height: 180px;
    }
    
    .aes-feature-groups.show {
        max-height: 400px;
    }
    
    .aes-buttons a {
        font-size: 12.5px;
        padding: 9px 4px;
        min-height: 38px;
    }
}

/* Tablet - 768px to 991px */
@media (max-width: 768px) {
    .aes-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 18px;
        padding: 15px 8px;
    }
    
    .aes-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .aes-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .aes-card {
        min-height: 480px;
        padding: 15px;
    }
    
    .aes-card-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .aes-image-slider,
    .aes-image {
        height: 170px;
        margin-bottom: 12px;
    }
    
    .aes-slider-nav {
        opacity: 1;
        pointer-events: auto;
    }
    
    .aes-slider-prev,
    .aes-slider-next {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .aes-toggle {
        width: 130px;
        padding: 9px 18px;
        font-size: 12.5px;
        min-height: 38px;
    }
    
    .aes-feature-groups.show {
        max-height: 350px;
    }
    
    .aes-group-header {
        padding: 10px 12px;
    }
    
    .aes-group-title {
        font-size: 13px;
    }
    
    .aes-feature-group.expanded .aes-group-content {
        padding: 12px;
    }
    
    .aes-group-content li {
        font-size: 12.5px;
        padding-left: 26px;
        margin-bottom: 8px;
    }
    
    .aes-group-content li::before {
        font-size: 13px;
        width: 18px;
        height: 18px;
    }
    
    .aes-buttons {
        flex-direction: row;
        gap: 8px;
        min-height: 50px;
    }
    
    .aes-buttons a {
        min-height: 36px;
        font-size: 12.5px;
        padding: 8px;
    }
    
    .aes-badge {
        font-size: 10px;
        right: -35px;
        padding: 3px 40px;
    }
}

/* Mobile Landscape - 576px to 767px */
@media (max-width: 576px) {
    .aes-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 12px 6px;
    }
    
    .aes-grid-4,
    .aes-grid-3,
    .aes-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .aes-card {
        min-height: 460px;
        padding: 14px;
    }
    
    .aes-card-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .aes-image-slider,
    .aes-image {
        height: 160px;
        margin-bottom: 10px;
    }
    
    .aes-meta {
        font-size: 12px;
        margin-bottom: 12px;
        padding-bottom: 8px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    
    .aes-toggle {
        width: 100%;
        max-width: 200px;
        padding: 8px 16px;
        font-size: 12px;
        min-height: 36px;
        margin: 5px auto 12px;
    }
    
    .aes-feature-groups.show {
        max-height: 300px;
    }
    
    .aes-group-header {
        padding: 8px 10px;
    }
    
    .aes-group-title {
        font-size: 12.5px;
    }
    
    .aes-feature-group.expanded .aes-group-content {
        padding: 10px;
        max-height: 300px;
    }
    
    .aes-group-content li {
        font-size: 12px;
        padding-left: 24px;
        line-height: 1.4;
        margin-bottom: 7px;
    }
    
    .aes-group-content li::before {
        font-size: 12px;
        width: 16px;
        height: 16px;
    }
    
    .aes-buttons {
        gap: 6px;
        padding-top: 12px;
        min-height: 120px;
        flex-direction: column;
    }
    
    .aes-buttons a {
        min-height: 34px;
        font-size: 12px;
        padding: 7px;
        border-radius: 8px;
        width: 100%;
    }
    
    .aes-slide-counter {
        font-size: 10px;
        padding: 3px 9px;
    }
    
    .aes-slider-dots {
        bottom: 8px;
    }
    
    .aes-slider-dot {
        width: 7px;
        height: 7px;
    }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
    .aes-grid {
        padding: 10px 4px;
        gap: 14px;
    }
    
    .aes-card {
        min-height: 440px;
        padding: 12px;
    }
    
    .aes-card-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .aes-image-slider,
    .aes-image {
        height: 150px;
    }
    
    .aes-meta {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .aes-feature-groups.show {
        max-height: 280px;
    }
    
    .aes-buttons {
        min-height: 110px;
    }
    
    .aes-buttons a {
        font-size: 11.5px;
        padding: 6px;
        min-height: 32px;
    }
    
    .aes-slider-prev,
    .aes-slider-next {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* Extra Small Mobile - 360px and below */
@media (max-width: 360px) {
    .aes-card {
        min-height: 420px;
        padding: 10px;
    }
    
    .aes-image-slider,
    .aes-image {
        height: 140px;
        padding: 10px;
    }
    
    .aes-card-title {
        font-size: 13px;
    }
    
    .aes-feature-groups.show {
        max-height: 250px;
    }
    
    .aes-group-content li {
        font-size: 11.5px;
        padding-left: 22px;
    }
    
    .aes-group-content li::before {
        width: 15px;
        height: 15px;
        font-size: 11px;
    }
    
    .aes-buttons a {
        font-size: 11px;
        padding: 5px;
    }
}

/* ============ TOUCH DEVICE OPTIMIZATIONS ============ */
@media (hover: none) and (pointer: coarse) {
    .aes-slider-nav {
        opacity: 1;
        pointer-events: auto;
    }
    
    .aes-toggle:hover,
    .aes-buttons a:hover,
    .aes-slider-prev:hover,
    .aes-slider-next:hover {
        transform: none;
    }
    
    .aes-card:hover {
        transform: none;
        box-shadow: var(--shadow-medium);
    }
    
    .aes-toggle:active,
    .aes-buttons a:active {
        transform: scale(0.98);
    }
}

/* ============ PRINT STYLES ============ */
@media print {
    .aes-grid-container {
        display: block;
    }
    
    .aes-grid {
        display: block;
    }
    
    .aes-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        min-height: auto;
        padding: 15px;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .aes-toggle {
        display: none;
    }
    
    .aes-feature-groups {
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
        border: 1px solid #eee;
        opacity: 1 !important;
    }
    
    .aes-buttons {
        display: none;
    }
    
    .aes-slider-nav,
    .aes-slider-dots,
    .aes-slide-counter {
        display: none;
    }
    
    .aes-image-slider .aes-slides {
        display: block;
    }
    
    .aes-slide {
        display: block;
        page-break-inside: avoid;
    }
    
    .aes-slide img {
        max-width: 100%;
        height: auto;
    }
}

/* ============ ACCESSIBILITY ============ */
.aes-toggle:focus,
.aes-buttons a:focus,
.aes-slider-prev:focus,
.aes-slider-next:focus,
.aes-slider-dot:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .aes-card {
        border: 2px solid #000;
    }
    
    .aes-buttons a {
        border: 2px solid #000;
    }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .aes-card,
    .aes-toggle,
    .aes-buttons a,
    .aes-slide img,
    .aes-image img,
    .aes-feature-groups,
    .aes-group-content,
    .aes-group-toggle {
        transition: none;
        animation: none;
    }
    
    .aes-slides {
        transition: none;
    }
}