/* ===================================
   USAge Website - Clean Professional Style
   Inspired by IARPC Collaborations
   =================================== */

/* --- CSS VARIABLES --- */
:root {
    /* Colors */
    --primary-color: #003d5c;
    --secondary-color: #0077be;
    --accent-color: #4a90a4;
    --text-dark: #2c3e50;
    --text-light: #5a6c7d;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #e9ecef;
    --border-color: #dee2e6;
    --success: #28a745;
    
    /* Typography */
    --font-main: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Crimson Pro', Georgia, serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* --- GLOBAL RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary-color);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- NAVIGATION --- */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--secondary-color);
    font-weight: 700;
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }
    .nav-menu a {
        font-size: 0.85rem;
    }
}

/* --- DROPDOWN MENU --- */
.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--secondary-color);
}

.dropdown-menu a::after {
    display: none;
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(rgba(0, 61, 92, 0.6), rgba(0, 119, 190, 0.45)), 
                url('../images/TO_photo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
        padding: 4rem 1.5rem;
    }
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Hero Badge - highlighted NSF/SCAR text */
.hero-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 61, 92, 0.3);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    max-width: 95%;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .hero-badge {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: white;
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: var(--font-main);
}

.hero-acronym {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.hero-acronym .acronym-letter {
    font-weight: 700;
    font-size: 2rem;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-acronym .acronym-full {
    font-weight: 700;
    font-size: 1.5rem;
    color: #FFD700;
    margin-left: 0.5rem;
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.btn-outline-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    background: transparent;
    color: var(--secondary-color);
    border: 1.5px solid var(--secondary-color);
}

.btn-outline-small:hover {
    background: var(--secondary-color);
    color: white;
}

/* --- SECTIONS --- */
.section {
    padding: var(--spacing-xl) var(--spacing-md);
}

.section-light {
    background: var(--bg-light);
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.section-heading {
    font-size: 2.25rem;
    margin-bottom: var(--spacing-sm);
}

.section-intro {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.section-link {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.section-link:hover {
    text-decoration: underline;
}

/* --- FEATURE GRID --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* --- NEWS GRID --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.news-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.news-date {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.news-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.card-link {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.card-link:hover {
    text-decoration: underline;
}

/* --- CTA SECTION --- */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.cta-content h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- PARTNER GRID --- */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: var(--spacing-lg);
}

.partner-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: var(--transition);
    text-decoration: none;
}

.partner-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.partner-card h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.partner-card p {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* --- FOOTER --- */
.footer {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-lg) var(--spacing-md);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-section p {
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.footer-section a {
    color: white;
    opacity: 0.9;
}

.footer-section a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-links a {
    font-size: 0.95rem;
}

.footer-disclaimer {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.875rem;
    opacity: 0.8;
}

.footer-disclaimer p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.footer-copyright {
    margin-top: 1rem;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* --- PAGE SPECIFIC STYLES --- */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 2rem 3rem;
    text-align: center;
}

.page-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-header p {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

/* --- INTERNATIONAL PAGE STYLES --- */

/* Program card styles */
.program-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
    overflow: hidden;
    border-left: 4px solid var(--secondary-color);
}

.program-header {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-gray) 100%);
    padding: 2rem;
    border-bottom: 2px solid var(--secondary-color);
}

.program-header h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.program-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
    font-style: italic;
}

.program-content {
    padding: 2rem;
}

.program-content h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.program-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.program-content ul {
    list-style: none;
    padding-left: 0;
}

.program-content ul li {
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    position: relative;
    line-height: 1.6;
}

.program-content ul li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Theme grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.theme-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
}

.theme-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* Program highlight box */
.program-highlight {
    background: #e6f3ff;
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.program-highlight h4 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Program links */
.program-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Opportunity grid - reuse feature-grid styling with custom cards */
.opportunity-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: var(--transition);
}

.opportunity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.opportunity-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.opportunity-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.opportunity-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* IPY opportunities list */
.ipy-opportunities {
    list-style: none;
    padding-left: 0;
    max-width: 900px;
    margin: 2rem auto;
}

.ipy-opportunities li {
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    line-height: 1.6;
}

.ipy-opportunities li:before {
    content: "❄";
    position: absolute;
    left: 1rem;
    font-size: 1.5rem;
}

/* --- UTILITY CLASSES --- */
.text-center { text-align: center; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .program-header h3 {
        font-size: 1.5rem;
    }
    
    .theme-grid {
        grid-template-columns: 1fr;
    }
    
    .program-links {
        flex-direction: column;
    }
    
    .program-links .btn {
        width: 100%;
        text-align: center;
    }
}
