/* 
 * Global Styles and Variables
 * Exact replica of OFAC design with Full Responsive Support
 */

:root {
    --top-bar-bg: #112239;
    --header-bg: #1b2d48;
    --nav-bg: #004c91;
    --footer-bg: #112239;
    --link-blue: #004c91;
    --card-red: #a12126;
    --card-blue: #1c304d;
    --card-purple: #4c2c71;
    --card-green: #1e5a33;
    --text-dark: #333333;
    --border-gray: #d6d7d9;
    --white: #ffffff;
    --gray-bg: #f4f4f4;
    
    --container-width: 1400px;
    --serif: 'Georgia', 'Times New Roman', serif;
    --sans: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--sans);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

p { margin-bottom: 1.2rem; }
.main-article p:last-child { margin-bottom: 0; }

a { color: var(--link-blue); text-decoration: none; border-bottom: 1px solid transparent; transition: 0.2s; }
a:hover { border-bottom-color: var(--link-blue); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* HELPER CLASSES */
.mb-1 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-3 { margin-top: 3rem; }

/* MOBILE MENU TOGGLE */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 1.2rem;
    font-weight: 700;
    align-items: center;
    gap: 10px;
}

/* HEADER */
.main-header {
    background-color: var(--header-bg);
    color: var(--white);
    padding: 1.5rem 0;
}
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-content { display: flex; flex-direction: column; min-width: 0; }
.header-title { font-family: var(--serif); font-size: 3rem; font-weight: 400; line-height: 1; margin-bottom: 0.5rem; }
.header-subtitle { font-size: 1.1rem; font-weight: 600; opacity: 0.9; letter-spacing: 0.5px; text-transform: uppercase; }

.header-logo {
    height: 100px;
    width: auto;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* NAVIGATION */
.main-nav {
    background-color: var(--nav-bg);
    border-bottom: 4px solid #f9c642;
    position: relative;
    z-index: 100;
}
.nav-links { list-style: none; display: flex; align-items: center; width: 100%; }
.nav-links li a {
    color: var(--white);
    display: block;
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: none;
}
.nav-links li a:hover { background: rgba(255,255,255,0.1); }
.search-item { margin-left: auto; }

/* MAIN CONTENT LAYOUT */
.site-content { padding: 3rem 0 10rem; }
.content-wrapper { 
    display: grid; 
    grid-template-columns: 1fr 380px; 
    gap: 4rem; 
    width: 100%; 
}
.content-wrapper-wide {
    grid-template-columns: 1fr;
}
.content-wrapper-wide .main-article {
    max-width: 920px;
}

.main-article h2 {
    font-family: var(--serif);
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.contact-header p {
    font-size: 1.15rem;
    max-width: 900px;
}

.mission p { font-size: 1.15rem; margin-bottom: 3rem; }

.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.split-col h3 { font-family: var(--serif); font-size: 2rem; margin-bottom: 1.5rem; font-weight: 400; }

.bullet-list {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}
.bullet-list li { margin-bottom: 0.5rem; padding-left: 0.5rem; }

/* SIDEBAR & CARDS */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; width: 100%; }
.card {
    padding: 2.5rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.card h3 {
    font-family: var(--serif);
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 400;
    line-height: 1.1;
}
.card p { font-size: 1.05rem; margin-bottom: 2rem; opacity: 0.9; }
.card-link {
    margin-top: auto;
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    border-bottom: none !important;
}
.card-link i { font-size: 1.5rem; margin-right: 12px; }

.card-red { background-color: var(--card-red); }
.card-blue { background-color: var(--card-blue); }
.card-purple { background-color: var(--card-purple); }
.card-green { background-color: var(--card-green); }

/* FOOTER LOGOS ROW OVERLAY (1, 2, 3, 4, 5) */
.footer-logos-overlay {
    position: absolute;
    top: -55px; /* Adjust to overlap the top of the footer */
    left: 0;
    right: 0;
    z-index: 20;
}
.footer-logos-row {
    display: flex;
    justify-content: space-between; /* Spread across the container width */
    align-items: center;
    gap: var(--footer-logo-gap);
    flex-wrap: nowrap;
}
.footer-logo-item {
    width: var(--footer-logo-size); /* Slightly larger circles */
    height: var(--footer-logo-size);
    flex: 0 0 var(--footer-logo-size);
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px; /* Minimal padding so logo fills the circle */
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    border-bottom: none !important;
    overflow: hidden; /* Ensure image stays within the circle */
}
.footer-logo-item:hover {
    transform: translateY(-8px);
}
.footer-logo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure logo is fully visible and fills space */
}

/* FOOTER */
.main-footer {
    --footer-logo-size: 130px;
    --footer-logo-gap: 1rem;

    background-color: var(--footer-bg);
    color: var(--white);
    padding: 8rem 0 4rem; /* Increased top padding to accommodate logos row */
    margin-top: 100px; 
    position: relative;
}
.footer-small-logo {
    width: 80px; 
    height: 80px; 
    border-radius: 50%;
    background: #fff;
    padding: 5px;
}
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 4rem; margin-bottom: 5rem; }
.footer-left { flex: 1; display: flex; flex-direction: column; gap: 2rem; }
.footer-branding { display: flex; align-items: center; gap: 1.5rem; }
.footer-branding h3 { color: var(--white); font-size: 1.1rem; line-height: 1.4; max-width: 250px; font-weight: 600; }
.footer-contact p { font-size: 0.9rem; opacity: 0.6; margin-bottom: 0.4rem; }
.footer-right { display: flex; gap: 6rem; }
.footer-col h4 { color: var(--white); margin-bottom: 2rem; font-size: 0.9rem; letter-spacing: 1.5px; text-transform: uppercase; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.8rem; }
.footer-col a { color: var(--white); opacity: 0.7; font-size: 0.95rem; border-bottom: none; transition: 0.3s; white-space: nowrap; }
.footer-col a:hover { opacity: 1; color: #f9c642; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; }
.copyright { font-size: 0.8rem; opacity: 0.4; }

/* CONTACT INFO BOX */
.contact-info-box { background: var(--gray-bg); padding: 2rem; border-left: 5px solid var(--link-blue); }
.contact-info-box h3 { font-family: var(--serif); font-size: 1.8rem; margin-bottom: 2rem; color: var(--top-bar-bg); }

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}
.contact-item i {
    color: var(--link-blue);
    font-size: 1.1rem;
    margin-top: 0.3rem; /* Align with first line of text */
}
.contact-item-text strong {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--top-bar-bg);
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}
.contact-item-text p {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0;
}

/* FORMS IMPROVEMENTS */
.contact-form { 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
    background: #fff;
    padding: 2.5rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
}
.form-group label { 
    font-weight: 700; 
    font-size: 0.85rem; 
    color: var(--top-bar-bg); 
    text-transform: uppercase; 
    margin-bottom: 0.6rem;
}
.form-group input, .form-group textarea { 
    padding: 1rem; 
    border: 1px solid var(--border-gray); 
    border-radius: 4px; 
    font-size: 1rem; 
    width: 100%; 
    font-family: var(--sans);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input::placeholder, .form-group textarea::placeholder {
    font-size: 0.95rem;
    color: #999;
    font-family: var(--sans);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--link-blue);
    box-shadow: 0 0 0 3px rgba(0, 76, 145, 0.1);
}
.btn-submit { 
    background: var(--link-blue); 
    color: #fff; 
    padding: 1.1rem 2rem; 
    border: none; 
    border-radius: 4px; 
    font-weight: 700; 
    cursor: pointer; 
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
}
.btn-submit:hover {
    background: #003a6e;
}

/* PORTAL / LOGIN */
.portal-container { display: grid; grid-template-columns: 1fr 450px; gap: 5rem; align-items: center; }
.portal-highlight { background: #fff; border-left: 4px solid var(--link-blue); padding: 1.5rem; margin-bottom: 2rem; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.login-card { background: #fff; padding: 3.5rem; border: 1px solid var(--border-gray); border-top: 6px solid var(--link-blue); box-shadow: 0 15px 40px rgba(0,0,0,0.08); }

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1200px) {
    .content-wrapper { gap: 2rem; }
}

@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
    .content-wrapper { grid-template-columns: 1fr; }
    .content-wrapper-wide .main-article { max-width: none; }
    .portal-container { grid-template-columns: 1fr; gap: 3rem; }
    .footer-top { gap: 2rem; }
    .footer-right { gap: 3rem; }
}

@media (max-width: 768px) {
    .main-header { padding: 1.2rem 0; }
    .header-flex { gap: 1rem; }
    .header-title { font-size: 1.8rem; }
    .header-subtitle { font-size: 0.8rem; letter-spacing: 0; }
    .header-logo { height: 70px; }
    
    .menu-toggle { display: flex; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--nav-bg);
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .nav-links.active { display: flex; }
    .nav-links li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .nav-links li a { padding: 1.2rem; font-size: 1rem; }
    .search-item { margin-left: 0; }

    .site-content { padding-bottom: 5rem; }
    .main-article h2 { font-size: 2rem; }
    .split-section { grid-template-columns: 1fr; }
    
    .card { padding: 2rem 1.5rem; min-height: auto; }
    .card h3 { font-size: 1.8rem; }

    /* Fix Footer Logos Overlap & Grid */
    .footer-logos-overlay { top: calc(var(--footer-logo-size) * -0.53); }
    .main-footer {
        --footer-logo-size: clamp(62px, 15vw, 85px);
        --footer-logo-gap: clamp(0.35rem, 2vw, 1rem);
        padding-top: calc(var(--footer-logo-size) + 2rem);
    }
    .footer-logos-row {
        justify-content: space-between;
    }
    .footer-logo-item {
        padding: 8px;
    }
    .footer-top { flex-direction: column; align-items: flex-start; text-align: left; }
    .footer-branding { margin-bottom: 2rem; }
    .footer-branding h3 { max-width: 100%; font-size: 1.1rem; }
    .footer-right { flex-direction: column; gap: 3rem; align-items: flex-start; }
    .footer-col { text-align: left; }

    .contact-form .row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .header-title { font-size: 1.4rem; }
    .header-subtitle { font-size: 0.7rem; }
    .header-logo { height: 55px; }
    
    .container { padding: 0 1rem; }
    .login-card { padding: 2rem 1.5rem; }

    .main-footer {
        --footer-logo-size: clamp(48px, 15.5vw, 65px);
        --footer-logo-gap: clamp(0.25rem, 1.8vw, 0.5rem);
    }
    .footer-logo-item {
        padding: 5px;
    }
    .footer-branding {
        gap: 1rem;
        align-items: center;
    }
    .footer-small-logo {
        width: 72px;
        height: 72px;
        flex: 0 0 72px;
    }
    
    .footer-branding h3 { font-size: 1rem; }
}
