/* Course Grid Layout */
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.course-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.course-image {
    height: 200px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* User Authentication Styles */
.user-menu {
    position: relative;
    margin-left: auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.user-profile i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-menu.active .user-profile i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-menu.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-menu a:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.user-profile:hover {
    background-color: #f5f5f5;
}

.user-name {
    font-weight: 500;
    color: #2962FF;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 200px;
    z-index: 100;
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.user-profile:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.user-dropdown a:hover {
    background: #f5f5f5;
    color: #2962FF;
}

.logout-btn {
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
    color: #dc3545 !important;
}

.logout-btn:hover {
    background: #fff5f5 !important;
    color: #dc3545 !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 2rem 1rem;
    }
}

@media (max-width: 768px) {
    .course-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .course-card {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .course-image {
        height: 180px;
    }
    
    .user-profile {
        padding: 0.25rem 0.5rem;
    }
    
    .user-dropdown {
        position: fixed;
        top: 60px;
        right: 1rem;
        left: 1rem;
        background: white;
    }
}

/* Base form styles */
.auth-form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"],
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    outline: none;
}

.auth-form .btn-submit {
    width: 100%;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.auth-form .btn-submit:hover {
    background: #2b6ed9;
    transform: translateY(-2px);
}

.auth-form .form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 15px;
    color: #666;
}

.auth-form .form-footer a {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
}

.auth-form .form-footer a:hover {
    text-decoration: underline;
}

.auth-form .error-message {
    color: #e53935;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.auth-form .form-group.error .error-message {
    display: block;
}

.auth-form .form-group.error input,
.auth-form .form-group.error select {
    border-color: #e53935;
    background-color: rgba(229, 57, 53, 0.05);
}

/* Certificate verification form */
.certificate-form {
    max-width: 600px;
    margin: 0 auto 40px;
}

.certificate-result {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
    border: 1px solid #e0e0e0;
    display: none;
}

.certificate-result.valid {
    border-color: #4caf50;
    background-color: rgba(76, 175, 80, 0.05);
}

.certificate-result.invalid {
    border-color: #f44336;
    background-color: rgba(244, 67, 54, 0.05);
}

.certificate-result h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    margin-bottom: 15px;
}

.certificate-result.valid h3 {
    color: #2e7d32;
}

.certificate-result.invalid h3 {
    color: #c62828;
}

.certificate-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.certificate-details p {
    margin: 8px 0;
}

.certificate-details .label {
    font-weight: 600;
    color: #555;
}

.certificate-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.certificate-actions .btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.certificate-actions .btn-download {
    background-color: #4285f4;
    color: white;
    border: none;
}

.certificate-actions .btn-download:hover {
    background-color: #2b6ed9;
}

.certificate-actions .btn-verify-another {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.certificate-actions .btn-verify-another:hover {
    background-color: #e0e0e0;
}

/* Responsive styles */
@media (max-width: 768px) {
    .auth-form {
        padding: 25px 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    }
    
    .auth-form h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .auth-form .form-group {
        margin-bottom: 15px;
    }
    
    .auth-form label {
        margin-bottom: 6px;
        font-size: 15px;
    }
    
    .auth-form input,
    .auth-form select,
    .auth-form textarea {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .auth-form .btn-submit {
        padding: 12px;
        font-size: 15px;
    }
    
    .certificate-details {
        grid-template-columns: 1fr;
    }
    
    .certificate-actions {
        flex-direction: column;
    }
    
    .certificate-actions .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .auth-form {
        padding: 20px 15px;
        border-radius: 6px;
    }
    
    .auth-form h2 {
        font-size: 20px;
    }
    
    .auth-form input,
    .auth-form select,
    .auth-form textarea {
        padding: 10px;
        font-size: 14px;
    }
    
    .certificate-result {
        padding: 15px;
    }
    
    .certificate-result h3 {
        font-size: 18px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form {
    animation: fadeIn 0.4s ease-out;
}

.certificate-result {
    animation: fadeIn 0.3s ease-out;
}
