/*
Student Name: Sam Kallu
Student ID: 991741165
Assignment 3 - Responsive Site

Description: Main stylesheet with responsive design for PBR materials site
including mobile, tablet, and desktop layouts.
*/


/* reset and base styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* header and navigation */
header {
    background-color: #2c3e50;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

nav li {
    margin: 0 1rem;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

nav a:hover {
    background-color: #34495e;
}

/* main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* hero section using gradient */
.hero {
    text-align: center;
    background-image: url('images/hero-image.jpg');
    background-repeat: no-repeat, repeat;
    color: white;
    padding: 4rem 2rem;
    border-radius: 10px;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* page header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* content sections */
section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    color: #34495e;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* content wrapper */
.content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.text-content {
    flex: 2;
}

.intro-image {
    flex: 1;
    max-width: 400px;
}

/* images and figures */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

figure {
    margin-bottom: 1.5rem;
}

figcaption {
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* key concepts grid */
.concepts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.concept {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.concept h3 {
    color: #3498db;
    margin-bottom: 1rem;
}

/* material examples */
.material-examples {
    display: grid;
    gap: 2rem;
}

.material-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.material-card figure {
    margin: 0;
}

.material-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0;
}

.material-info {
    padding: 1.5rem;
}

.material-info ul {
    list-style: none;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.material-info li {
    padding: 0.25rem 0;
    font-family: monospace;
    font-size: 0.9rem;
}

/* resources */
.resource-category {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.resource-link {
    border-left: 4px solid #3498db;
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.resource-link h3 a {
    color: #2980b9;
    text-decoration: none;
}

.resource-link h3 a:hover {
    text-decoration: underline;
}

/* tips grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tip {
    background: #e8f4fd;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.tip h4 {
    color: #2980b9;
    margin-bottom: 0.5rem;
}

/* lists */
ul li {
    margin-bottom: 0.5rem;
}

.why-pbr ul {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.why-pbr li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.why-pbr li:last-child {
    border-bottom: none;
}

/* footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* media queries */

/* tablet styles */
@media screen and (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .intro-image {
        max-width: 100%;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 0.25rem 0;
    }
    
    main {
        padding: 1rem 0.5rem;
    }
    
    .concepts-grid {
        grid-template-columns: 1fr;
    }
    
    .material-card {
        margin-bottom: 1rem;
    }
}

/* mobile styles */
@media screen and (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .concept {
        padding: 1rem;
    }
    
    .material-info {
        padding: 1rem;
    }
    
    .resource-category {
        padding: 1rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .tip {
        padding: 1rem;
    }
}

/* large screen optimization */
@media screen and (min-width: 1200px) {
    .material-examples {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
}
