/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== MAIN PAGE CERTIFICATIONS SECTION ===== */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.certification-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.certification-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  z-index: -1;
}

.certification-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  background: rgba(255, 255, 255, 0.12);
}

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

.certification-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  position: relative;
  transition: all var(--transition);
}

.certification-card:hover .certification-icon {
  transform: scale(1.1);
}

.certification-icon.gold {
  background: linear-gradient(135deg, #FFD700, #D4AF37);
  color: #8B7500;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.certification-icon.platinum {
  background: linear-gradient(135deg, #E5E4E2, #C0C0C0);
  color: #696969;
  box-shadow: 0 5px 15px rgba(192, 192, 192, 0.3);
}

.certification-icon.diamond {
  background: linear-gradient(135deg, #B9F2FF, #4EE2EC);
  color: #009ACD;
  box-shadow: 0 5px 15px rgba(78, 226, 236, 0.3);
}

.certification-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--light);
}

.certification-threshold {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
  background: rgba(255, 138, 0, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  display: inline-block;
}

/* Gold */
.certification-threshold.gold {
  color: #FFDD00;
  background: rgba(255, 221, 0, 0.15);
}

/* Platinum */
.certification-threshold.platinum {
  color: #F5F5F5;
  background: rgba(245, 245, 245, 0.15);
}

/* Diamond */
.certification-threshold.diamond {
  color: #00F0FF;
  background: rgba(0, 240, 255, 0.15);
}

.certification-card p {
  margin-bottom: 0;
  flex-grow: 1;
  color: rgba(255, 255, 255, 0.85);
}

.certifications-button-container {
  margin-top: 3rem;
}

/* ===== CERTIFICATIONS PAGE STYLES ===== */
#certifications-filter {
  padding: 2rem 0;
  background: rgba(0, 0, 0, 0.2);
}

.filter-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.filter-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light);
  padding: 0.7rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--primary);
  box-shadow: 0 5px 15px rgba(255, 62, 77, 0.4);
}

.filter-btn .gold-icon {
  color: #FFDD00; /* super bright gold */
}

.filter-btn .platinum-icon {
  color: #F5F5F5; /* almost pure white platinum */
}

.filter-btn .diamond-icon {
  color: #00F0FF; /* vibrant icy cyan-blue */
}

.search-box {
  position: relative;
  min-width: 250px;
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 0.7rem 1.2rem 0.7rem 2.5rem;
  color: var(--light);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.search-box input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
}

#certificates-grid {
  padding: 3rem 0;
}

.certificates-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* A2 Vertical Long Format */
.certificate-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 1/1.414; /* A2 aspect ratio: 1:√2 */
  display: flex;
  flex-direction: column;
}

.certificate-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  background: rgba(255, 255, 255, 0.12);
}

.certificate-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  flex: 1;
}

.certificate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.certificate-card:hover .certificate-image img {
  transform: scale(1.05);
}

.certificate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.certificate-card:hover .certificate-overlay {
  opacity: 1;
}

.certificate-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.certificate-badge.gold {
  background: linear-gradient(135deg, #FFD700, #D4AF37);
  color: #8B7500;
}

.certificate-badge.platinum {
  background: linear-gradient(135deg, #E5E4E2, #C0C0C0);
  color: #696969;
}

.certificate-badge.diamond {
  background: linear-gradient(135deg, #B9F2FF, #4EE2EC);
  color: #009ACD;
}

.certificate-info h4 {
  color: var(--light);
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.certificate-info p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.certificate-info .certificate-type {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.certificate-info .certificate-type.gold {
  background: rgba(255, 215, 0, 0.2);
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.certificate-info .certificate-type.platinum {
  background: rgba(229, 228, 226, 0.2);
  color: #E5E4E2;
  border: 1px solid rgba(229, 228, 226, 0.3);
}

.certificate-info .certificate-type.diamond {
  background: rgba(185, 242, 255, 0.2);
  color: #B9F2FF;
  border: 1px solid rgba(185, 242, 255, 0.3);
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light);
  padding: 0.7rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
}

.pagination-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-number:hover {
  background: rgba(255, 255, 255, 0.15);
}

.pagination-number.active {
  background: var(--primary);
  box-shadow: 0 5px 15px rgba(255, 62, 77, 0.4);
}

.pagination-ellipsis {
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
}

/* Loading and Error States */
.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 3rem auto;
    max-width: 500px;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.no-results, .error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 3rem auto;
    max-width: 500px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-results i, .error-message i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-results h3, .error-message h3 {
    color: var(--light);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.no-results p, .error-message p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Enhanced Placeholder Styles */
.placeholder-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0rem 2rem;
    text-align: center;
}

.placeholder-content {
    max-width: 600px;
    color: rgba(255, 255, 255, 0.8);
}

.placeholder-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.placeholder-content h3 {
    color: var(--light);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.placeholder-content p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.placeholder-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.certs-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition);
}

.certs-stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.certs-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.certs-stat-icon.gold {
    background: linear-gradient(135deg, #FFD700, #D4AF37);
    color: #8B7500;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.certs-stat-icon.platinum {
    background: linear-gradient(135deg, #E5E4E2, #C0C0C0);
    color: #696969;
    box-shadow: 0 5px 15px rgba(192, 192, 192, 0.3);
}

.certs-stat-icon.diamond {
    background: linear-gradient(135deg, #B9F2FF, #4EE2EC);
    color: #009ACD;
    box-shadow: 0 5px 15px rgba(78, 226, 236, 0.3);
}

.stat-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-title {
    font-weight: 600;
    color: var(--light);
    font-size: 1rem;
    line-height: 1.2;
}

.stat-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    /* Main page certifications */
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .certification-card {
        padding: 2rem 1.5rem;
    }

    .certification-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    /* Certifications page */
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-options {
        justify-content: center;
    }

    .search-box {
        min-width: auto;
    }

    .certificates-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .certificate-card {
        max-width: 100%;
    }

    .certificate-overlay {
        padding: 1rem;
    }

    .certificate-info h4 {
        font-size: 1.1rem;
    }

    .certificate-info p {
        font-size: 0.9rem;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-numbers {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }

    /* Placeholder responsive */
    .placeholder-container {
        padding: 0rem 1rem;
    }

    .placeholder-icon {
        font-size: 4rem;
    }

    .placeholder-content h3 {
        font-size: 1.5rem;
    }

    .placeholder-content p {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }

    .placeholder-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .certs-stat-item {
        flex-direction: row;
        text-align: left;
        padding: 1.2rem;
        gap: 1.2rem;
        align-items: center;
    }

    .certs-stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .stat-text {
        align-items: flex-start;
        flex: 1;
    }

    .stat-title {
        font-size: 0.95rem;
    }

    .stat-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .certificate-badge {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .certificate-overlay {
        padding: 0.8rem;
    }

    .certificate-info h4 {
        font-size: 1rem;
    }

    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .pagination-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .certifications-button-container {
        display: flex;
        justify-content: center;
    }

    .certifications-button-container .btn-store {
        max-width: 300px;
    }

    /* Placeholder responsive */
    .placeholder-container {
        padding: 0rem 1rem;
    }

    .placeholder-icon {
        font-size: 4rem;
        margin-bottom: 1.5rem;
    }

    .placeholder-content h3 {
        font-size: 1.3rem;
    }

    .placeholder-content p {
        margin-bottom: 2rem;
    }

    .certs-stat-item {
        padding: 1rem;
        gap: 1rem;
    }

    .certs-stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .stat-title {
        font-size: 0.9rem;
    }

    .stat-desc {
        font-size: 0.75rem;
    }
}

@media (max-width: 400px) {
    .certificates-container {
        gap: 1rem;
    }

    .certificate-card {
        min-height: 400px;
    }
}

/* Mobile Touch Effects */
@media (max-width: 767px) {
    .certificate-card.mobile-active {
        transform: translateY(-8px);
        box-shadow: var(--shadow-hover);
        background: rgba(255, 255, 255, 0.12);
    }

    .certificate-card.mobile-active .certificate-image img {
        transform: scale(1.05);
    }

    .certificate-card.mobile-active .certificate-overlay {
        opacity: 1;
    }

    /* Add tap feedback */
    .certificate-card {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.3s ease;
    }

    .certificate-card:active {
        transform: scale(0.98);
    }
}

/* Enhanced hover effects for desktop */
@media (min-width: 768px) {
    .certificate-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-hover);
        background: rgba(255, 255, 255, 0.12);
    }

    .certificate-card:hover .certificate-image img {
        transform: scale(1.05);
    }

    .certificate-card:hover .certificate-overlay {
        opacity: 1;
    }
}

/* Pulse animation for the trophy icon */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}