/* 
   Author: Reginald Adjabeng-Ankrah
   Course: CS-110 Intro to Web Programming (Spring 2025)
   File: style.css
*/

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

@media (max-width: 480px) {
    .profile-pic {
        width: 40px;
        height: 40px;
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .hero-content h1 {
        font-size: 1.8em;
    }
    
    .hero-content p {
        font-size: 1em;
    }
    
    .content-container {
        padding: 20px;
    }
}

body {
    font-family: Georgia, serif;
    background-color: #FFE6E8; /* pink background */
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* header nav styling */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 230, 232, 0.95);
    z-index: 1000;
    padding: 15px 30px;
}

nav {
    display: table;
    width: 100%;
    position: relative; /* for dropdown positioning */
}

/* profile picture */
.profile-link {
    float: left;
    text-decoration: none;
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #FF00CC;
}

/* nav buttons section */
.nav-buttons {
    float: left;
    margin-left: 50px;
    list-style: none;
    padding: 0;
}

.nav-item {
    float: left;
    position: relative;
    margin-right: 40px;
    list-style: none;
}

.nav-btn {
    display: block;
    background-color: #FF00CC; /* pink */
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: bold;
    transition: all 0.3s;
}

/* hover effect with yellow */
.nav-btn:hover {
    background-color: #FFD800; /* yellow */
    color: #333;
}

/* dropdown styling */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-top: 0;
    overflow: hidden;
}

.dropdown li {
    list-style: none;
}

.dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown a:hover {
    background-color: #FFE6E8;
    color: #FF00CC;
}

/* show dropdown on hover */
.nav-item:hover .dropdown {
    display: block;
}

/* mobile show class */
.dropdown.show {
    display: block !important;
}

/* ensure dropdown stays visible */
.nav-item {
    float: left;
    position: relative;
    margin-right: 40px;
    list-style: none;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-top: 0;
    overflow: hidden;
}

/* sparkly lab logo section */
.logo-link {
    float: right;
    text-decoration: none;
    display: block;
    color: #FF00CC;
    font-weight: bold;
    font-size: 20px;
}

.favicon {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin-right: 10px;
}

/* hero section */
.hero-section {
    margin-top: 80px;
    flex: 1;
    background-color: #FFE6E8;
    background-image: url('../images/hero.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.5em;
}

/* card layouts for landing pages */
.cards-container {
    width: 90%;
    max-width: 1200px;
    margin: 50px auto;
    overflow: hidden;
    clear: both; /* clear floats */
}

.card {
    float: left;
    width: 30%;
    margin: 1.66%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s;
    box-sizing: border-box; /* include padding in width */
}

.card:hover {
    transform: translateY(-10px);
}

.card img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.card h3 {
    color: #FF00CC;
    margin-bottom: 15px;
}

.card p {
    color: #666;
    margin-bottom: 20px;
}

.card a {
    display: inline-block;
    background-color: #39FF14;
    color: #333;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
}

/* about page styles */
.about-container {
    width: 90%;
    max-width: 800px;
    margin: 100px auto 50px;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.about-header {
    text-align: center;
    margin-bottom: 40px;
}

.about-header img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid #FF00CC;
    margin-bottom: 20px;
}

.about-section {
    margin-bottom: 30px;
}

.about-section h2 {
    color: #FF00CC;
    margin-bottom: 15px;
    border-bottom: 2px solid #FFE6E8;
    padding-bottom: 10px;
}

/* content pages */
main {
    flex: 1;
}

.content-container {
    width: 90%;
    max-width: 800px;
    margin: 100px auto 50px;
    background: white;
    padding: 40px;
    border-radius: 20px;
}

.content-container h1 {
    color: #FF00CC;
    margin-bottom: 30px;
    text-align: center;
}

.product-icon {
    width: 100px;
    margin: 0 auto 30px;
    display: block;
}

.status-badge {
    display: inline-block;
    background-color: #FFD800;
    color: #333;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9em;
    margin-left: 10px;
}

/* footer styles */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: auto; /* push to bottom */
}

footer p {
    margin: 10px 0;
}

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

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

/* mobile responsive */
@media (max-width: 768px) {
    .nav-buttons {
        margin-left: 20px;
    }
    
    .nav-item {
        margin-right: 15px;
    }
    
    .nav-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .logo-link {
        font-size: 16px;
    }
    
    .card {
        width: 100%;
        margin: 10px 0;
    }
    
    .hero-content h1 {
        font-size: 2em;
    }
    
    .hero-content p {
        font-size: 1.1em;
    }
    
    .hero-btn {
        display: block;
        margin: 10px auto;
        width: 200px;
    }
    
    .feature {
        width: 100%;
        margin: 10px 0;
    }
}
/* ACCESSIBILITY FIXES */
/* Better contrast for links and text */
.nav-btn {
    background-color: #E0007C; /* Darker pink for better contrast */
}

.nav-btn:hover {
    background-color: #FFD700; /* Better yellow contrast */
    color: #000;
}

.card a {
    background-color: #32CD32; /* Better green contrast */
    color: #000;
}

/* Improve text contrast on pink background */
body {
    color: #1a1a1a; /* Darker text for better contrast */
}

.about-section h2, .content-container h1 {
    color: #C0005C; /* Darker pink for better contrast */
}

/* MOBILE PERFORMANCE & UX FIXES */
@media (max-width: 768px) {
    /* Faster mobile navigation */
    .nav-buttons {
        flex-direction: column;
        gap: 8px;
        margin-left: 15px;
    }
    
    .nav-btn {
        padding: 10px 18px;
        font-size: 0.9em;
    }
    
    /* Better mobile cards */
    .cards-container {
        padding: 0 15px;
    }
    
    .card {
        margin: 15px 0;
        padding: 25px;
    }
    
    /* Optimize images on mobile */
    .card img, .product-icon {
        width: 60px;
        height: 60px;
    }
    
    /* Better mobile hero */
    .hero-content h1 {
        font-size: 2.2em;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1.1em;
        line-height: 1.4;
    }
    
    /* Improve mobile about section */
    .about-container {
        margin: 80px auto 30px;
        padding: 25px;
    }
    
    .about-header img {
        width: 120px;
        height: 120px;
    }
}

/* Ultra-mobile (phones) */
@media (max-width: 480px) {
    header {
        padding: 10px 15px;
    }
    
    .profile-pic {
        width: 40px;
        height: 40px;
    }
    
    .nav-btn {
        padding: 8px 15px;
        font-size: 0.85em;
    }
    
    .hero-content h1 {
        font-size: 1.8em;
    }
    
    .content-container, .about-container {
        margin: 70px auto 30px;
        padding: 20px;
    }
}
