* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, rgba(26, 42, 58, 0.85) 0%, rgba(13, 27, 42, 0.85) 100%), url('../imgs/INTELLIMEN-Logo1.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 50px 0;
    text-align: center;
    border-bottom: 5px solid #e67e22;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header h1 span {
    color: #e67e22;
}

nav {
    background-color: #1a2a3a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li a,
nav ul li form {
    display: block;
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

nav ul li a:hover,
nav ul li a.active,
nav ul li form:hover {
    background-color: #e67e22;
}

nav ul li button {
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}

.main-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding: 40px;
    margin-top: 30px;
    min-height: 500px;
}

.btn {
    display: inline-block;
    background-color: #e67e22;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #d35400;
}

.btn-success {
    background-color: #27ae60;
}

.btn-success:hover {
    background-color: #219a52;
}

.btn-danger {
    background-color: #c0392b;
}

.btn-danger:hover {
    background-color: #a93226;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.8rem;
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.challenge-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #e67e22;
    position: relative;
}

.challenge-card.completed {
    border-left-color: #27ae60;
    background: #f0fff4;
}

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

.challenge-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e67e22;
    margin-bottom: 10px;
}

.completed .challenge-number {
    color: #27ae60;
}

.challenge-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #1a2a3a;
    line-height: 1.4;
}

.completed-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #27ae60;
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
}

.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 25px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    background: #e67e22;
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
    text-align: center;
    color: white;
    font-size: 0.8rem;
    line-height: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.alert {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.name-row {
    display: flex;
    gap: 15px;
}

.name-row .form-group {
    flex: 1;
}

.action-buttons {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.challenge-content {
    line-height: 1.8;
    margin: 20px 0;
}

.challenge-content h3 {
    color: #1a2a3a;
    margin: 20px 0 10px;
}

.challenge-content ul,
.challenge-content ol {
    margin-left: 25px;
    margin-top: 10px;
}

.challenge-content li {
    margin: 8px 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.admin-table th {
    background: #1a2a3a;
    color: white;
}

.admin-table tr:hover {
    background: #f5f5f5;
}

.main-content h2 {
    color: #1a2a3a;
    margin-bottom: 20px;
}

.main-content h3 {
    color: #1a2a3a;
    margin: 25px 0 10px;
}

.main-content p {
    margin: 15px 0;
    line-height: 1.8;
}

.main-content ul,
.main-content ol {
    margin: 15px 0 15px 25px;
}

.main-content li {
    margin: 8px 0;
    line-height: 1.6;
}

.main-content .last-updated {
    color: #666;
    margin-bottom: 20px;
}

footer {
    background-color: #1a2a3a;
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 40px;
}

footer a {
    color: #e67e22;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }
    .challenges-grid {
        grid-template-columns: 1fr;
    }
    nav ul li a {
        padding: 10px 15px;
        font-size: 14px;
    }
    header h1 {
        font-size: 1.8rem;
    }
    .name-row {
        flex-direction: column;
        gap: 0;
    }
}
/* Mobile Responsive Images */
.challenge-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive tables for mobile */
@media (max-width: 768px) {
    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .challenge-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .challenge-content img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Applies to ALL blockquotes site-wide */
blockquote,
.quote {
    background-color: #f9f3e8;
    border-left: 5px solid #e67e22;
    padding: 20px;
    margin: 30px 0;
    border-radius: 5px;
    font-style: italic;
    color: #555;
}

/* Quote styling */
.challenge-content .quote {
    background-color: #f9f3e8;
    border-left: 5px solid #e67e22;
    padding: 20px;
    margin: 30px 0;
    border-radius: 5px;
}

.challenge-content .quote p:first-child {
    font-style: italic;
    margin: 0;
}

.challenge-content .quote p:last-child {
    font-weight: bold;
    margin-top: 10px;
    text-align: right;
    margin-bottom: 0;
}
