.robot-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

.category-detail-container {
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 30px auto;
    max-width: 1200px; /* Add this line */
    padding: 0 20px;    /* Add some horizontal padding */
    flex-wrap: wrap;
    justify-content: center;
}

.category-description-short {
    flex: 1;
    max-width: 600px; /* You can increase this slightly if needed */
    color: white;
    padding: 20px;
    border-radius: 10px;
    word-wrap: break-word; /* Ensure long words don’t overflow */
    overflow-wrap: break-word;
}

.category-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.subtitle {
    font-size: 28px;
    color: #00ff88;
    margin-bottom: 10px;
}

.read-more-btn {
    background-color: #00ff88;
    color: #000;
    border: none;
    padding: 20px 30px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
}

.registration-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.read-more-btn a {
    color: rgb(0, 0, 0);
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 17px;
}


.close-btn {
    color: #00ff88;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
}

.action-buttons {
    display: flex;
    gap: 20px;
    margin: 30px 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn {
    background: none;
    color: white;
    border: 2px solid #00b3ff;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    min-width: 220px; /* Ensures all buttons are wide enough */
    min-height: 48px;  /* Makes them equal in height */
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
}


.btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0; /* Prevents icon from shrinking */
}


.modal-scroll-content p,
.modal-scroll-content li,
.modal-scroll-content a,
.modal-scroll-content strong,
.modal-scroll-content h1,
.modal-scroll-content h2,
.modal-scroll-content h3 {
    font-size: 14px;
}

.modal-scroll-content h1,
.modal-scroll-content h2,
.modal-scroll-content strong {
    color: #1a73e8;
    font-weight: bold;
}

.modal-scroll-content h1 {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 12px;
}

.modal-scroll-content h2 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-scroll-content h3 {
    font-size: 16px;
    margin-top: 15px;
    margin-bottom: 8px;
}

.modal-scroll-content ul {
    padding-left: 20px;
    margin-bottom: 14px;
    list-style-type: disc;
}

.modal-scroll-content li {
    margin-bottom: 8px;
}

.modal-scroll-content a {
    color: #007BFF;
    text-decoration: none;
}

.modal-scroll-content a:hover {
    text-decoration: underline;
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}


.modal-content {
    background-color: #111;
    color: white;
    padding: 2px;
    border: 2px solid #00ff88;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.modal-scroll-content {
    overflow-y: auto;
    flex: 1; 
    padding: 10px;
    margin: 5px;
}


body.modal-open {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

@media (max-width: 768px) {
    .category-title {
        font-size: 24px;
        text-align: center;
        white-space: normal; /* Allow text to wrap */
        margin: 0 auto 10px;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        text-overflow: clip;
    }

    .subtitle {
        font-size: 22px;
        text-align: center;
        margin-bottom: 15px;
    }

    /* Fix for double media query declarations */
    .category-detail-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin: 20px auto;
        padding: 0 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .robot-image {
        max-width: 300px;
        width: 90%;
        margin: 0 auto 10px;
        display: block;
    }

    .category-description-short {
        max-width: 100%;
        padding: 10px 15px;
        box-sizing: border-box;
        text-align: center;
    }

    .category-description-short p {
        text-align: left;
        margin: 0 auto;
    }

    /* Make the read more button more visible */
    .read-more-btn {
        display: block;
        width: 80%;
        max-width: 300px;
        margin: 20px auto 0;
        padding: 15px 20px;
        font-size: 16px;
    }
}

/* Standardizing countdown boxes across pages */
@media (max-width: 768px) {
    .countdown-wrapper {
        margin: 40px auto;
        padding: 0 15px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .countdown-title {
        font-size: 20px;
        line-height: 1.4;
        margin-bottom: 20px;
    }

    .countdown-subtitle {
        font-size: 20px;
        display: block;
        margin-top: 10px;
    }

    .countdown-boxes {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin: 20px auto;
        flex-wrap: wrap;
    }

    .time-box {
        width: 70px;
        height: auto;
        padding: 10px 5px;
    }

    .time-box .number {
        font-size: 1.5rem;
    }

    .time-box .label {
        font-size: 0.8rem;
        margin-top: 5px;
    }

    .countdown-stripe {
        width: 80%;
        margin: 25px auto;
    }

    .event-date {
        font-size: 0.9rem;
        padding: 0 10px;
    }
}

/* Smaller screens adjustments */
@media (max-width: 480px) {
    .category-title {
        font-size: 20px;
    }

    .subtitle {
        font-size: 18px;
    }

    .time-box {
        width: 60px;
        padding: 8px 5px;
    }

    .time-box .number {
        font-size: 1.2rem;
    }

    .time-box .label {
        font-size: 0.7rem;
    }

    /* Action buttons adjustments */
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin: 20px 15px;
    }

    .action-btn {
        width: 100%;
        max-width: 300px;
        padding: 10px;
        justify-content: center;
        font-size: 14px;
    }

    /* Modal adjustments */
    .modal-content {
        max-width: 90%;
        max-height: 80vh;
        padding: 10px;
    }

    .modal-scroll-content {
        padding: 10px 5px;
    }
}

@media (max-width: 480px) {
    .action-btn {
        width: 100%;
        max-width: 300px;
        min-height: 48px;
        padding: 10px;
        justify-content: center;
        font-size: 14px;
    }
}
