/* Global Styles */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    margin-bottom: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    padding: 5px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    color: #777;
}

/* PROJECT VIEWER PAGE STYLES */
.project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.project-images {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 15px;
    background-color: #f0f2f5;
    scrollbar-width: thin;
}

.project-image {
    height: 200px;
    min-width: 300px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-image:hover {
    transform: scale(1.05);
}

.project-info {
    padding: 20px;
}

.project-info h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.project-category {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
}

.project-description {
    margin-bottom: 20px;
    color: #555;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.project-link {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.project-link:hover {
    background-color: var(--primary-dark);
}

/* Modal for enlarged images */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#enlarged-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.close-button {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* PROJECT UPLOAD PAGE STYLES */
.upload-form {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.form-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.tech-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
}

.image-uploader {
    margin-top: 10px;
}

.file-upload-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 100px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.upload-icon {
    font-size: 30px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

input[type="file"] {
    display: none;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    width: 150px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.remove-button:hover {
    background-color: var(--error-color);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-button {
    background-color: #f1f1f1;
    color: #555;
}

.reset-button:hover {
    background-color: #e0e0e0;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
}

.submit-button:hover {
    background-color: var(--primary-dark);
}

/* Responsive Styles */
@media screen and (min-width: 768px) {
    .project-card {
        flex-direction: row;
    }
    
    .project-images {
        flex-direction: column;
        width: 40%;
    }
    
    .project-image {
        width: 100%;
        min-width: auto;
    }
    
    .project-info {
        width: 60%;
    }
}

@media screen and (max-width: 767px) {
    .tech-checkboxes {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .upload-preview {
        justify-content: center;
    }
}
