/* 
* SuperAgers Website - Main Stylesheet
* A professional design for middle-aged audience
* Features scroll animations and mobile responsiveness
*/

/* ===== BASE STYLES & RESET ===== */
:root {
    /* Color variables */
    --primary-color: #1a365d;
    --secondary-color: #2c7873;
    --accent-color: #f0a500;
    --background-color: #f9f7f0;
    --text-color: #333333;
    --light-text: #ffffff;
    --border-color: #e0e0e0;
    
    /* Typography */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    
    /* Spacing */
    --section-spacing: 5rem;
    --element-spacing: 2rem;
}

/* Hide mobile break by default */
.mobile-break {
    display: none;
}

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

html {
    font-size: 78.125%; /* Increased from 62.5% by 25% */
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: 2rem; /* Increased from 1.6rem */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

h1 {
    font-size: 5.25rem;
    margin-bottom: 3rem;
    text-align: left;
    position: relative;
    display: block;
    width: 100%;
}

h2 {
    font-size: 4.5rem; /* Increased from 3.6rem */
}

h3 {
    font-size: 3rem; /* Increased from 2.4rem */
    color: var(--primary-color);
}

p {
    margin-bottom: 1.6rem;
}

strong {
    font-weight: 600;
}

/* ===== LINKS ===== */
a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

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

.section-title {
    text-align: left;
    margin-bottom: 4rem;
    position: relative;
    display: block;
    width: 100%;
    font-size: 4.5rem;
}

.section-title:after {
    content: '';
    display: block;
    width: 100%;
    height: 1.1rem;
    background: linear-gradient(
        to bottom,
        var(--accent-color) 0.45rem,
        transparent 0.45rem 0.85rem,
        var(--accent-color) 0.85rem 1.1rem
    );
    margin: 1.5rem 0 0;
    border-radius: 0.2rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    border-radius: 0.4rem;
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 2rem; /* Increased from 1.6rem */
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1);
}

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

.primary-btn:hover {
    background-color: #e09600;
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.15);
}

.secondary-btn {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.secondary-btn:hover {
    background-color: #1a2f47;
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.15);
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    background-color: var(--primary-color);
    padding: 2rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--heading-font);
    font-size: 3.4rem; /* Increased from 2.4rem */
    font-weight: 700;
    color: var(--light-text);
    text-decoration: none;
    display: block;
}

.logo-image {
    height: 150px; /* Large height as requested */
    width: 600px; /* 800px wide as requested */
    max-height: 150px; /* Match the height */
    object-fit: contain; /* Maintain aspect ratio without distortion */
    display: block;
    margin-top: -20px; /* Bleed over top margin */
    margin-bottom: -20px; /* Bleed over bottom margin */
    margin-left: -30px; /* Position closer to left side of screen */
}

.nav-menu {
    display: none;
    list-style: none;
    position: fixed;
    left: -100%;
    top: 7rem;
    flex-direction: column;
    background-color: var(--primary-color);
    width: 100%;
    text-align: left;
    transition: 0.3s;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1);
    padding: 2rem 0;
    z-index: 1000;
}

.nav-menu.active {
    left: 0;
    display: flex;
}

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    padding: 0.8rem 1.6rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-text {
    color: var(--light-text);
    font-family: var(--heading-font);
    font-size: 1.8rem;
    font-weight: 500;
    margin-right: 1rem;
}

.bars-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 2.1rem;
}

.bar {
    display: block;
    width: 2.5rem;
    height: 0.3rem;
    background-color: var(--light-text);
    transition: all 0.3s ease;
}

.menu-toggle .bar + .bar {
    margin-top: 0.5rem;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 12rem 0 6rem;
    background-color: var(--background-color);
    margin-top: 25px; /* Move section down 25px */
}

.hero-wrapper {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 60rem;
}

.hero-image {
    flex: 1;
    max-width: 50rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.1);
}

.hero h1:after {
    content: '';
    display: block;
    width: 100%;
    height: 1.1rem;
    background: linear-gradient(
        to bottom,
        var(--accent-color) 0.45rem,
        transparent 0.45rem 0.85rem,
        var(--accent-color) 0.85rem 1.1rem
    );
    margin: 1.5rem 0 0;
    border-radius: 0.2rem;
}

.definition {
    font-size: 2.5rem; /* Increased from 2rem */
    font-weight: 500;
    margin-bottom: 3rem;
}

.description {
    font-size: 2.25rem; /* Increased from 1.8rem */
    margin-bottom: 2rem;
}

/* ===== HABITS SECTION ===== */
.habits {
    padding: var(--section-spacing) 0;
    background-color: #f5f3e6;
}

.habits-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
}

.habit-item {
    flex: 1 1 15rem;
    max-width: 30rem;
    background-color: var(--light-text);
    border-radius: 0.8rem;
    padding: 3rem 2rem;
    text-align: left;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.habit-item:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.15);
}

.habit-icon {
    width: 8rem;
    height: 8rem;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 4.5rem; /* Increased from 3.6rem */
}

.sleep-icon {
    background-color: #4ecdc4;
    color: var(--light-text);
}

.social-icon {
    background-color: #5d8cae;
    color: var(--light-text);
}

.active-icon {
    background-color: #ff6b6b;
    color: var(--light-text);
}

.stress-icon {
    background-color: #a786df;
    color: var(--light-text);
}

.mental-icon {
    color: var(--light-text);
}

.habits-image {
    width: 100%;
    text-align: center;
    margin: 2rem 0 4rem 0;
}

.habits-image img {
    width: 100%;
    max-width: 1200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media screen and (max-width: 1200px) {
    .habit-item {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .habits-container {
        gap: 2rem;
    }
}

@media screen and (min-width: 1201px) {
    .habit-item {
        flex: 1 1 calc(50% - 2.4rem);
        max-width: calc(50% - 2.4rem);
    }
}

/* ===== MEMORY MONITOR SECTION ===== */
.memory-monitor {
    padding: var(--section-spacing) 0;
    background-color: var(--background-color);
}

.memory-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.memory-text {
    flex: 1;
}

.memory-text ul {
    margin: 2rem 0 3rem 2rem;
}

.memory-text li {
    margin-bottom: 1rem;
    font-size: 2.25rem; /* Increased from 1.8rem */
}

.memory-image {
    flex: 1;
    max-width: 800px;
    margin: 0 auto 3rem;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.2);
}

.memory-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 1rem;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.2);
}

/* Placeholder for missing images */
.memory-image, .puzzles-image, .about-image {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color));
    min-height: 30rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    font-family: var(--heading-font);
    font-size: 2rem;
}

.memory-image {
    background-color: #000;
    padding: 2rem;
    border-radius: 1rem;
}

.puzzles-image {
    background-color: #1a1e2e;
    padding: 2rem;
    border-radius: 1rem;
}

.about-image {
    background-color: #001a33;
    padding: 2rem;
    border-radius: 1rem;
}

/* ===== PUZZLES SECTION ===== */
.puzzles {
    padding: var(--section-spacing) 0;
    background-color: #f5f3e6;
}

.puzzles-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.puzzles-text {
    flex: 1;
}

.puzzles-image {
    flex: 1;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.2);
}

.puzzles-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--section-spacing) 0;
    background-color: var(--background-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
}

.about-text p {
    font-size: 2.25rem; /* Increased from 1.8rem */
    margin-bottom: 2rem;
}

.about-image {
    flex: 1;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.2);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 4rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1.6rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-0.3rem);
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE STYLES ===== */
@media screen and (max-width: 1023px) {
    html {
        font-size: 72.5%; /* Increased from 58% */
    }
    
    .hero-wrapper {
        flex-direction: column;
        text-align: left;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero h1:after {
        margin: 1rem 0 0;
    }
    
    .hero-image {
        max-width: 100%;
    }
    
    .memory-content,
    .puzzles-content,
    .about-content {
        flex-direction: column;
        gap: 3rem;
    }
    
    .memory-image,
    .puzzles-image,
    .about-image {
        width: 100%;
        max-width: 50rem;
        margin: 0 auto;
    }
}

@media screen and (max-width: 767px) {
    html {
        font-size: 70.3125%;
    }

    .mobile-break {
        display: block;
    }

    .section-title .mobile-break {
        display: block;
        height: 0.75em;
    }

    .memory-content,
    .puzzles-content,
    .about-content {
        flex-direction: column;
    }

    .memory-text,
    .puzzles-text,
    .about-text {
        order: 2;
    }

    .memory-image,
    .puzzles-image,
    .about-image {
        order: 1;
        margin-bottom: 3rem;
    }

    .btn {
        display: block;
        width: 100%;
        margin-top: 2rem;
    }

    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(0.8rem) rotate(45deg);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-0.8rem) rotate(-45deg);
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: left;
    }

    .video-container {
        width: 100%;
        margin: 1rem 0;
        padding-bottom: 56.25%;
    }
    
    .video-container iframe {
        width: 100%;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 3.6rem;
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 3.2rem;
        margin-bottom: 3rem;
    }
}

@media screen and (max-width: 480px) {
    html {
        font-size: 62.5%; /* Increased from 50% */
    }
    
    .hero {
        padding: 10rem 0 4rem;
    }
    
    .section-title:after {
        width: 100%;
    }
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    margin-bottom: 20px;
}

.video-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Specific styles for M3 video embed */
.m3-video-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color));
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.2);
}

.m3-video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.m3-video-container .video-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.m3-video-container .video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}

.play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 20px 0 20px 35px;
    border-color: transparent transparent transparent #ffffff;
}

.embed-image {
    display: none;
}

/* Hide play button when video is playing */
.video-player.playing + .play-button {
    display: none;
}

/* ===== RESOURCES SECTION ===== */
.resources {
    padding: 4rem 0;
    background-color: var(--background-color);
}

.resources-content {
    max-width: 800px;
    margin: 0;
    text-align: left;
}

.resources-list {
    list-style: none;
    padding: 0;
}

.resources-list li {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.resources-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    margin-bottom: 0.3rem;
}

.citation {
    font-size: 1.4rem;
    color: var(--text-color);
    opacity: 0.8;
    font-style: italic;
}

.resources-list i {
    font-size: 1.4rem;
    color: var(--accent-color);
}

/* ===== INSTITUTIONAL PERSPECTIVES SECTION ===== */
.institutional-perspectives {
    padding: 4rem 0;
    background-color: var(--background-color);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.video-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.placeholder .video-container {
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    color: var(--text-color);
    opacity: 0.6;
}

.placeholder-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.placeholder-content p {
    font-size: 1.4rem;
    font-style: italic;
}

.video-caption {
    text-align: left;
}

.video-caption h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.video-caption .citation {
    font-size: 1.4rem;
    color: var(--text-color);
    opacity: 0.8;
    font-style: italic;
}

@media screen and (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.video-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.thumbnail-link {
    display: inline-block;
    text-decoration: none;
    color: var(--text-color);
    width: fit-content;
}

.thumbnail-link img {
    width: 150px;
    height: auto;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.thumbnail-link .video-title {
    display: block;
    font-size: 1.4rem;
    font-weight: 500;
    max-width: 150px;
    line-height: 1.3;
}

@media screen and (max-width: 767px) {
    .thumbnail-link img {
        width: 120px;
    }
    
    .thumbnail-link .video-title {
        max-width: 120px;
        font-size: 1.2rem;
    }
}
