/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333; /* Added a default text color for better readability */
}

/* Header */
header {
    background-color: #ADD8E6; /* Light blue */
    color: white;
    text-align: center;
    padding: 20px;
    position: relative;
}

/* --- IMPROVEMENT: Replaced 'cm' with 'px' for better screen rendering and responsiveness --- */
/* Left Logo */
header img.logo-left {
    position: absolute;
    left: 15px;
    top: 15px;
    width: 100px; /* Changed from 4cm */
    height: auto; /* Maintain aspect ratio */
}

/* Profile Photo on Contact Page */
header img.profile-photo {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 100px; /* Changed from 4cm */
    height: 100px; /* Changed from 4cm */
    border-radius: 50%;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}

/* University Logos for Engineering, Logistics, IT */
header img.logo-right {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 100px; /* Changed from 4cm */
    height: auto;
}

/* Social Icons */
.social-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

/* Navigation Bar */
nav {
    background-color: #005599;
    padding: 10px;
    text-align: center;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    display: inline-block;
}

nav a:hover {
    background-color: #004080;
    border-radius: 5px;
}

/* =================================================== */
/* ↓↓↓ REPLACE THIS SECTION IN styles.css ↓↓↓     */
/* =================================================== */

/* Main Layout */
.main-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    gap: 30px; /* This creates a space between the content and sidebar */
}

.main-content {
    flex: 5; /* This makes it take 5/6 of the space */
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
    min-width: 0; /* Ensures content can shrink without overflowing */
}

/* New rule for the sidebar */
.sidebar {
    flex: 1; /* This makes it take 1/6 of the space */
    /* You can add a background or other styles here if you wish */
}

/* --- IMPROVEMENT: Enhanced Media Query for Mobile Devices (up to 768px) --- */
@media screen and (max-width: 768px) {
    /* Adjust header content for small screens */
    header {
        padding-top: 80px; /* Add padding to prevent content from overlapping with logos */
    }

    /* Stack the main content and sidebar vertically */
    .main-container {
        flex-direction: column;
        padding: 10px;
    }
    
    /* Make logos smaller and header less crowded */
    header img.logo-left,
    header img.profile-photo,
    header img.logo-right {
        width: 70px; /* Smaller logo size */
        height: auto;
        top: 10px;
    }
    
    header img.profile-photo {
        height: 70px; /* Maintain circle shape */
    }
    
    /* Make navigation links more touch-friendly and prevent awkward wrapping */
    nav a {
        display: block; /* Stack navigation links vertically */
        padding: 12px;
        border-bottom: 1px solid #004080; /* Add a separator */
    }

    nav a:last-child {
        border-bottom: none; /* Remove border from the last link */
    }
    
    /* Ensure images in content don't overflow their containers */
    .main-content img {
        max-width: 100%;
        height: auto;
    }
}
