/* ==========================================================================
   IFI Website — Main Stylesheet
   Clone of ifi-inc.com WordPress site
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Hind:wght@400;600;700;800&family=Roboto:wght@400;500;600;700&display=swap');

/* ==========================================================================
   CSS Variables / Design Tokens
   ========================================================================== */
:root {
    --red-primary: #D8202C;
    --blue-heading: #063771;
    --link-color: #11719E;
    --text-black: #000000;
    --text-gray: #707070;
    --text-light: #D6D6D6;
    --bg-light-gray: #E8E8E9;
    --bg-dark-gray: #242424;
    --bg-black: #000000;
    --border-light: #CCCCCC;
    --divider-gray: #5C5C5C;
    --white: #FFFFFF;

    --font-body: 'Hind', arial, helvetica, sans-serif;
    --font-heading: 'Roboto', sans-serif;
    --font-size-base: 18px;
    --line-height-base: 30px;

    --content-max-width: 1400px;
    --footer-max-width: 1400px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-black);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    text-decoration: underline;
}

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

ul, ol {
    padding-left: 2em;
}

/* ==========================================================================
   Top Utility Bar
   ========================================================================== */
.top-bar {
    border-bottom: 1px solid var(--border-light);
    padding: 8px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-black);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 400;
}

.top-bar-phone a {
    color: var(--text-black);
    text-decoration: none;
}

.top-bar-phone svg {
    width: 14px;
    height: 14px;
    fill: var(--text-black);
}

.top-bar-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-icons a {
    color: var(--text-black);
    display: flex;
    align-items: center;
}

.top-bar-icons svg {
    width: 20px;
    height: 20px;
    fill: var(--text-black);
}

.top-bar-icons a:hover svg {
    fill: var(--red-primary);
}

/* ==========================================================================
   Logo / Header
   ========================================================================== */
.site-header {
    background: var(--white);
}

.logo-bar {
    text-align: left;
    padding: 20px 30px;
    position: relative;
}

.logo-bar a {
    display: inline-block;
}

.logo-bar img {
    max-width: 500px;
    width: 100%;
    height: auto;
    display: inline-block;
}

.header-divider {
    height: 2px;
    background: var(--divider-gray);
}

/* ==========================================================================
   Hamburger Menu (Mobile)
   ========================================================================== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--text-black);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    background: var(--white);
    border-top: 1px solid var(--border-light);
    padding: 0;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav a {
    display: block;
    padding: 12px 30px;
    color: var(--text-black);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 500;
}

.mobile-nav a:hover {
    background: var(--bg-light-gray);
    text-decoration: none;
}

/* ==========================================================================
   Homepage — US Element Section
   ========================================================================== */
.section-uselement {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 60px 30px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.section-uselement-text {
    flex: 1;
    max-width: 660px;
}

.section-uselement-text h2 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--blue-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.section-uselement-text p {
    margin-bottom: 16px;
}

.section-uselement-text p em a {
    color: var(--link-color);
}

.section-uselement-logo {
    flex: 0 0 500px;
}

.section-uselement-logo img {
    width: 100%;
}

/* ==========================================================================
   Homepage — Our Story Section
   ========================================================================== */
.section-ourstory {
    background: var(--bg-light-gray);
    border-top: none;
}

.section-ourstory-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 60px 30px;
    display: flex;
    align-items: flex-start;
    gap: 60px;
}

.section-ourstory-text {
    flex: 1;
    max-width: 660px;
}

.section-ourstory-text h2 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--red-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.section-ourstory-text .red-underline {
    width: 210px;
    height: 2px;
    background: var(--red-primary);
    margin-bottom: 24px;
}

.section-ourstory-text p {
    margin-bottom: 16px;
}

.section-ourstory-image {
    flex: 0 0 500px;
}

.section-ourstory-image img {
    width: 100%;
    border-radius: 0;
}

/* ==========================================================================
   Hero Banner (Interior Pages: News, Terms)
   ========================================================================== */
.hero-banner {
    background: url('../images/entry-header.jpg') center center / cover no-repeat;
    position: relative;
    padding: 60px 30px;
    min-height: 200px;
    display: flex;
    align-items: flex-end;
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.hero-banner h1 {
    position: relative;
    z-index: 1;
    font-family: var(--font-body);
    font-size: 54px;
    font-weight: 800;
    font-style: italic;
    color: var(--white);
    max-width: var(--content-max-width);
    margin: 0 auto;
    width: 100%;
}

/* ==========================================================================
   News Page
   ========================================================================== */
.news-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 50px 30px;
}

.news-post {
    margin-bottom: 60px;
}

.news-post:last-child {
    margin-bottom: 0;
}

.news-post h2 {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-black);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.news-post h2 a {
    color: var(--text-black);
    text-decoration: none;
}

.news-post h2 a:hover {
    color: var(--red-primary);
}

.news-post .red-divider {
    height: 3px;
    background: var(--red-primary);
    margin-bottom: 10px;
}

.news-post .post-date {
    font-family: var(--font-body);
    font-size: 16px;
    font-style: italic;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.news-post .post-content {
    line-height: 1.7;
}

.news-post .post-content ul {
    margin: 16px 0;
    padding-left: 2.5em;
}

.news-post .post-content li {
    margin-bottom: 6px;
}

/* Post Navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-light);
}

.post-nav a {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--link-color);
}

.post-nav a:hover {
    color: var(--red-primary);
}

/* ==========================================================================
   Terms Page
   ========================================================================== */
.terms-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 50px 30px 60px;
}

.terms-content h2 {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-black);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.terms-content ol {
    padding-left: 1.5em;
    margin: 0;
}

.terms-content ol li {
    margin-bottom: 20px;
    line-height: 1.7;
    padding-left: 0.5em;
}

.terms-content ol li strong {
    font-weight: 700;
}

/* Download as PDF button */
.btn-download {
    display: inline-block;
    background: var(--red-primary);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 36px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 30px;
}

.btn-download:hover {
    background: #b91a24;
    color: var(--white);
    text-decoration: none;
}

/* ==========================================================================
   Sitemap Page
   ========================================================================== */
.sitemap-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 50px 30px;
}

.sitemap-content h2 {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-black);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.sitemap-content .red-divider {
    height: 3px;
    background: var(--red-primary);
    margin-bottom: 30px;
}

.sitemap-content ul {
    list-style: disc;
    padding-left: 2em;
}

.sitemap-content li {
    margin-bottom: 10px;
    font-size: 17px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--bg-dark-gray);
    padding: 60px 30px;
}

.footer-inner {
    max-width: var(--footer-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h6 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.footer-col p,
.footer-col a {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.8;
}

.footer-col a:hover {
    color: var(--white);
    text-decoration: none;
}

.footer-news-links {
    list-style: none;
    padding: 0;
}

.footer-news-links li {
    margin-bottom: 8px;
}

.footer-news-links a {
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--text-light);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-contact-item svg {
    width: 16px;
    height: 16px;
    fill: var(--text-light);
    flex-shrink: 0;
}

.footer-sitemap-link {
    margin-top: 20px;
}

.footer-sitemap-link a {
    font-size: 12px;
    color: var(--text-gray);
}

.footer-sitemap-link a:hover {
    color: var(--text-light);
}

/* Copyright Bar */
.copyright-bar {
    background: var(--bg-black);
    padding: 14px 30px;
    text-align: center;
}

.copyright-bar p {
    font-family: var(--font-heading);
    font-size: 12px;
    color: var(--text-light);
}

.copyright-bar a {
    color: var(--link-color);
    font-size: 12px;
}

/* ==========================================================================
   Responsive — Tablet (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .section-uselement {
        gap: 30px;
    }

    .section-uselement-logo {
        flex: 0 0 380px;
    }

    .section-ourstory-inner {
        gap: 30px;
    }

    .section-ourstory-image {
        flex: 0 0 380px;
    }
}

/* ==========================================================================
   Responsive — Mobile (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Top bar */
    .top-bar {
        padding: 8px 15px;
    }

    /* Logo */
    .logo-bar {
        padding: 15px;
        position: relative;
    }

    .logo-bar img {
        max-width: 300px;
    }

    .hamburger {
        display: block;
    }

    /* US Element Section */
    .section-uselement {
        flex-direction: column;
        padding: 40px 20px;
        gap: 30px;
    }

    .section-uselement-logo {
        flex: none;
        width: 100%;
        max-width: 300px;
    }

    /* Our Story Section */
    .section-ourstory-inner {
        flex-direction: column;
        padding: 40px 20px;
        gap: 30px;
    }

    .section-ourstory-image {
        flex: none;
        width: 100%;
    }

    /* Hero Banner */
    .hero-banner {
        min-height: 140px;
        padding: 30px 20px;
    }

    .hero-banner h1 {
        font-size: 34px;
    }

    /* News */
    .news-content {
        padding: 30px 20px;
    }

    .news-post h2 {
        font-size: 20px;
    }

    /* Terms */
    .terms-content {
        padding: 30px 20px;
    }

    /* Footer */
    .site-footer {
        padding: 40px 20px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Post nav */
    .post-nav {
        flex-direction: column;
        gap: 12px;
    }
}

/* ==========================================================================
   Responsive — Small Mobile (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .logo-bar img {
        max-width: 220px;
    }

    .hero-banner h1 {
        font-size: 28px;
    }

    .section-uselement-text h2,
    .section-ourstory-text h2 {
        font-size: 14px;
    }
}
