/* SP&M Lab Universal Stylesheet */
/* Works for: Home, Projects, and Research Areas & Tools pages */

:root {
    --primary-color: #A24C24; /* SP&M Brown */
    --secondary-color: #FFEFD7; /* SP&M Cream */
    --tertiary-color: #322C2C; /* SP&M Dark */
    --accent-color: #EE9222; /* SP&M Orange */
    --accent-light: #F4BA5D; /* SP&M Light Orange */
    --text-color: #322C2C; /* SP&M Dark Gray */
    --link-color: #EE9222; /* SP&M Orange */
}

/* ========== RESET & BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 50 L60 40 L50 30 L40 40 Z' fill='%23F4BA5D' fill-opacity='0.1'/%3E%3C/svg%3E");
    background-size: 100px 100px;
}

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

/* ========== HEADER STYLES ========== */
header {
    background-color: var(--accent-light);
    color: var(--tertiary-color);
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    width: 500px;
    height: auto;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-logo {
    max-width: 100%;
    height: auto;
    display: block;
}

.lab-title {
    flex-grow: 1;
}

.lab-title h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-family: 'Shrikhand', cursive, 'Arial', sans-serif;
    font-weight: normal;
    opacity: 0.8;
}

.lab-title h2 {
    font-size: 1.2rem;
    font-weight: normal;
    opacity: 0.9;
}

.kgs-logo-container {
    margin-top: 15px;
}

.kgs-logo {
    height: 40px;
    width: auto;
}

/* ========== NAVIGATION STYLES ========== */
nav {
    background-color: var(--primary-color);
    padding: 15px 0;
}

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

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--accent-color);
}

/* ========== MAIN CONTENT STYLES ========== */
main {
    padding: 40px 0;
}

/* ========== SECTION STYLES ========== */
/* Universal section styling for all content blocks */
.intro-section,
.resources-section,
.contact-section,
.news-section,
.project-section,
.research-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border-left: 5px solid var(--primary-color);
    position: relative;
}

/* Accent colors for different section types */
.resources-section,
.contact-section {
    border-left-color: var(--accent-color);
}

/* Section headers */
.intro-section h2,
.resources-section h2,
.contact-section h2,
.news-section h2,
.project-section h2,
.research-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    font-family: 'Shrikhand', cursive, 'Arial', sans-serif;
    font-size: 2rem;
    font-weight: normal;
}

.intro-section h3,
.project-section h3,
.research-section h3 {
    color: var(--primary-color);
    margin: 20px 0 15px 0;
    font-size: 1.4rem;
}

.contact-section h3 {
    color: var(--primary-color);
    margin: 20px 0 15px 0;
    font-size: 1.3rem;
    border-bottom: 1px solid var(--accent-light);
    padding-bottom: 5px;
}

/* ========== HOME PAGE SPECIFIC STYLES ========== */
/* Intro section special decorations */
.intro-section::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background-image: url('img/spamsushi_name.webp');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1;
    opacity: 0.8;
}

.intro-section ul {
    margin: 10px 0 20px 20px;
}

.intro-section li {
    margin-bottom: 5px;
}

/* Coming soon animation */
.coming-soon {
    background-color: var(--accent-light);
    color: var(--text-color);
    padding: 15px 20px 15px 20px;
    border-radius: 15px;
    display: inline-block;
    margin: 20px 0;
    font-weight: bold;
    animation: pulse 2s infinite;
    border: 2px solid var(--primary-color);
    position: relative;
    padding-right: 60px;
}

.coming-soon::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-image: url('img/spamsushi_fx.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Software grid for resources */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.software-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background-color: var(--secondary-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.software-item:hover {
    background-color: var(--accent-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.software-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.software-item span {
    font-weight: bold;
    text-align: center;
    font-size: 0.9rem;
}

/* Contact section styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 20px;
}

.contact-card {
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--accent-light);
}

.contact-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.contact-card p {
    margin-bottom: 8px;
}

.team-list {
    margin-bottom: 25px;
}

.team-member {
    background-color: var(--secondary-color);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 3px solid var(--accent-color);
}

.team-member h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.team-member p {
    margin-bottom: 3px;
    font-size: 0.9rem;
}

/* News section styles */
.news-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.news-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: 'Shrikhand', cursive, 'Arial', sans-serif;
    font-size: 1.6rem;
    font-weight: normal;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: center;
}

.news-image-container {
    width: 100%;
}

.news-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 3px solid var(--primary-color);
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
}

.news-content h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-weight: normal;
}

.news-content h4 {
    font-size: 1rem;
    color: var(--text-color);
    margin: 10px 0;
    font-weight: normal;
}

/* Lab contact info styles */
.lab-contact-info {
    margin-bottom: 30px;
}

.lab-address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}

.lab-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 3px solid var(--primary-color);
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
}

.address-card {
    background-color: var(--accent-light);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
}

.address-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-family: 'Shrikhand', cursive, 'Arial', sans-serif;
    font-weight: normal;
}

.address-card p {
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .lab-address-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========== PROJECTS & RESEARCH PAGE STYLES ========== */
/* Project and research grids */
.project-grid,
.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    margin: 20px 0;
}

.project-image,
.research-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 3px solid var(--primary-color);
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
}

.project-content ul,
.research-content ul {
    margin: 10px 0 20px 20px;
}

.project-content li,
.research-content li {
    margin-bottom: 8px;
}

/* Highlight boxes and product lists */
.highlight-box {
    background-color: var(--accent-light);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid var(--primary-color);
}

.products-list {
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.products-list h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Tool grid for research page */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin: 20px 0;
}

.tool-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    align-items: start;
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.tool-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    background-color: white;
    padding: 10px;
}

.tool-content h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.tool-content ul {
    margin: 10px 0 15px 20px;
}

.tool-content li {
    margin-bottom: 5px;
}

.tool-content p {
    margin-top: 15px;
    font-weight: bold;
}

/* Methods grid for computational capabilities */
.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.method-card {
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.method-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.method-card ul {
    margin: 10px 0 0 20px;
}

.method-card li {
    margin-bottom: 5px;
}

/* ========== LINK STYLES ========== */
a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Special link effects for non-read-more links */
a:not(#read-more):not(#read-more-2):after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-light);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

a:not(#read-more):not(#read-more-2):hover:after {
    transform-origin: bottom left;
    transform: scaleX(1);
}

/* Special read-more link styling */
a#read-more, a#read-more-2 {
    color: var(--link-color);
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    padding-right: 50px;
}

a#read-more:hover, a#read-more-2:hover {
    color: var(--primary-color);
}

a#read-more:after, a#read-more-2:after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background-image: url('img/spamsushi_fx.webp');
    background-size: contain;
    background-repeat: no-repeat;
    right: 10px;
    transition: transform 0.3s ease;
}

a#read-more:hover:after, a#read-more-2:hover:after {
    transform: translateX(5px);
}

/* ========== FOOTER STYLES ========== */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.contact-info {
    margin-top: 10px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 10px;
    background-color: white;
    padding: 5px;
    border-radius: 5px;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    /* Header responsive */
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .lab-title h1 {
        font-size: 1.5rem;
    }
    
    /* Navigation responsive */
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Grid responsive */
    .news-grid,
    .project-grid,
    .research-grid {
        grid-template-columns: 1fr;
    }
    
    .news-image-container {
        margin-bottom: 15px;
    }
    
    /* Contact responsive */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tool grid responsive */
    .tool-item {
        grid-template-columns: 1fr;
    }
    
    .tool-image {
        height: auto;
        max-height: 200px;
    }
    
    /* Methods grid responsive */
    .methods-grid {
        grid-template-columns: 1fr;
    }
}