
modern.css
This is where most of the visual transformation happens.
/* =========================================
   TED POWER WEBSITE
   MODERN STYLESHEET
   ========================================= */


/* ---------- BASIC RESET ---------- */

* {
    box-sizing: border-box;
}


body {

    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 17px;

    line-height: 1.65;

    color: #333333;

    background: #f7f8fa;

}


/* ---------- LINKS ---------- */

a {

    color: #234a66;

}


a:hover {

    color: #4f7c78;

}


/* ---------- CONTENT WIDTH ---------- */

.content-container {

    width: 90%;

    max-width: 1100px;

    margin-left: auto;

    margin-right: auto;

}


.narrow {

    max-width: 800px;

}


/* =========================================
   HEADER
   ========================================= */


.site-header {

    background: white;

    border-bottom: 1px solid #dddddd;

}


.header-container {

    width: 90%;

    max-width: 1100px;

    margin: auto;

    padding-top: 25px;

    padding-bottom: 20px;

}


/* ---------- SITE TITLE ---------- */

.logo {

    font-size: 30px;

    font-weight: bold;

    letter-spacing: 2px;

    text-decoration: none;

    color: #234a66;

}


.tagline {

    margin-top: 2px;

    margin-bottom: 20px;

    color: #666666;

    font-size: 16px;

}


/* =========================================
   NAVIGATION
   ========================================= */


.main-navigation {

    display: flex;

    flex-wrap: wrap;

    gap: 5px;

}


.main-navigation a {

    text-decoration: none;

    padding: 8px 14px;

    color: #333333;

    font-size: 15px;

    font-weight: 500;

}


.main-navigation a:hover {

    background: #eef2f4;

    color: #234a66;

}


/* =========================================
   HERO
   ========================================= */


.hero {

    background: white;

    padding-top: 70px;

    padding-bottom: 75px;

}


.hero h1 {

    font-size: 42px;

    line-height: 1.2;

    color: #234a66;

    margin-top: 0;

}


.hero-introduction {

    font-size: 22px;

    max-width: 700px;

    color: #444444;

}


/* ---------- BUTTON ---------- */

.button {

    display: inline-block;

    margin-top: 20px;

    padding: 12px 24px;

    background: #234a66;

    color: white;

    text-decoration: none;

    border-radius: 4px;

    font-weight: bold;

}


.button:hover {

    background: #4f7c78;

    color: white;

}


/* =========================================
   GENERAL SECTIONS
   ========================================= */


section {

    padding-top: 65px;

    padding-bottom: 65px;

}


h2 {

    font-size: 30px;

    line-height: 1.3;

    color: #234a66;

    margin-top: 0;

}


h3 {

    color: #234a66;

    font-size: 22px;

}


.section-introduction {

    color: #666666;

    margin-bottom: 35px;

}


/* =========================================
   START SECTION
   ========================================= */


.start-section {

    background: #f1f4f5;

}


/* ---------- CARD GRID ---------- */

.card-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 25px;

}


.main-card {

    display: block;

    background: white;

    padding: 30px;

    border: 1px solid #dddddd;

    border-radius: 6px;

    text-decoration: none;

    color: #333333;

    transition:
        transform 0.2s,
        box-shadow 0.2s;

}


.main-card:hover {

    transform: translateY(-4px);

    box-shadow:
        0 6px 18px
        rgba(0,0,0,0.12);

}


.main-card h3 {

    margin-top: 0;

}


.card-link {

    display: block;

    margin-top: 20px;

    font-weight: bold;

    color: #234a66;

}


/* =========================================
   FEATURED RESOURCES
   ========================================= */


.featured-section {

    background: white;

}


.featured-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 40px;

}


.featured-item {

    border-top:
        4px solid #4f7c78;

    padding-top: 15px;

}


.featured-item h3 {

    margin-top: 0;

}


.featured-item a {

    font-weight: bold;

    text-decoration: none;

}


/* =========================================
   ABOUT RESOURCES
   ========================================= */


.about-resources {

    background: #eef2f4;

}


/* =========================================
   ABOUT TED
   ========================================= */


.about-ted {

    background: white;

}


.text-button {

    display: inline-block;

    margin-top: 10px;

    font-weight: bold;

    text-decoration: none;

}


/* =========================================
   FOOTER
   ========================================= */


.site-footer {

    background: #234a66;

    color: white;

    padding-top: 30px;

    padding-bottom: 30px;

}


.site-footer p {

    margin: 5px 0;

}


.site-footer a {

    color: white;

    text-decoration: none;

    margin-right: 15px;

}


.site-footer a:hover {

    text-decoration: underline;

}


/* =========================================
   MOBILE
   ========================================= */


@media screen and (max-width: 800px) {


    body {

        font-size: 16px;

    }


    .hero {

        padding-top: 45px;

        padding-bottom: 50px;

    }


    .hero h1 {

        font-size: 34px;

    }


    .hero-introduction {

        font-size: 19px;

    }


    .card-grid {

        grid-template-columns: 1fr;

    }


    .featured-grid {

        grid-template-columns: 1fr;

    }


    section {

        padding-top: 45px;

        padding-bottom: 45px;

    }


}
/* =========================================
   DROPDOWN NAVIGATION
   ========================================= */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-menu {
    display: none;

    position: absolute;

    top: 100%;
    left: 0;

    min-width: 240px;

    background: white;

    border: 1px solid #dddddd;

    box-shadow:
        0 6px 18px
        rgba(0,0,0,0.12);

    z-index: 1000;
}

.nav-dropdown-menu a {
    display: block;

    padding: 10px 14px;

    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: #eef2f4;
}

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


/* MOBILE DROPDOWNS */

@media screen and (max-width: 800px) {

    .main-navigation {
        flex-direction: column;
    }

    .nav-dropdown-menu {
        position: static;

        box-shadow: none;

        border-left: 3px solid #dddddd;

        margin-left: 14px;
    }

}
/* =========================================
   CHAPTER GRID PAGES
   ========================================= */

.chapter-page {
    background: #f7f8fa;
}


/* ---------- PAGE INTRODUCTION ---------- */

.chapter-intro {
    background: white;
    padding-top: 60px;
    padding-bottom: 45px;
    border-bottom: 1px solid #dddddd;
}

.chapter-intro h1 {
    margin-top: 0;
    margin-bottom: 15px;

    font-size: 42px;
    line-height: 1.2;

    color: #234a66;
}

.chapter-intro p {
    max-width: 800px;
    margin-bottom: 0;

    font-size: 19px;
    color: #555555;
}


/* ---------- CHAPTER SECTION ---------- */

.chapter-section {
    padding-top: 55px;
    padding-bottom: 70px;
}


/* ---------- CHAPTER GRID ---------- */

.chapter-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 25px;
}


/* ---------- CHAPTER CARD ---------- */

.chapter-card {
    display: flex;
    flex-direction: column;

    background: white;

    padding: 28px;

    border: 1px solid #dddddd;

    border-radius: 6px;

    text-decoration: none;

    color: #333333;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}


.chapter-card:hover {
    transform: translateY(-4px);

    border-color: #b9c7cf;

    box-shadow:
        0 8px 20px
        rgba(0, 0, 0, 0.10);
}


.chapter-card h2,
.chapter-card h3 {
    margin-top: 0;
    margin-bottom: 12px;

    color: #234a66;

    font-size: 22px;

    line-height: 1.3;
}


.chapter-card p {
    margin-top: 0;

    color: #555555;

    flex-grow: 1;
}


/* ---------- CHAPTER NUMBER ---------- */

.chapter-number {
    display: block;

    margin-bottom: 12px;

    font-size: 13px;

    font-weight: bold;

    letter-spacing: 1px;

    text-transform: uppercase;

    color: #4f7c78;
}


/* ---------- READ MORE ---------- */

.chapter-link {
    margin-top: 18px;

    font-weight: bold;

    color: #234a66;
}


/* =========================================
   LEGACY NAVIGATION PROTECTION
   Prevent old page navigation appearing
   as an unwanted vertical link column
   ========================================= */

/*
Only navigation inside .main-navigation
should use the modern site navigation styling.
*/

.site-header nav:not(.main-navigation) {
    display: none;
}


/* Hide legacy navigation lists when explicitly
   marked as old navigation */

.legacy-navigation,
.old-navigation {
    display: none;
}


/* =========================================
   CHAPTER GRID MOBILE
   ========================================= */

@media screen and (max-width: 900px) {

    .chapter-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media screen and (max-width: 600px) {

    .chapter-intro {
        padding-top: 45px;
        padding-bottom: 35px;
    }

    .chapter-intro h1 {
        font-size: 34px;
    }

    .chapter-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .chapter-card {
        padding: 24px;
    }

}