/* Base styles from your style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #ffffff;
    overflow-x: hidden;
    background-color: #EDEBE3;
}

body.no-scroll {
    overflow: hidden;
}

/* Your original styles for nav, hero, cards, etc. */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #272F47;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 1rem 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-nav {
    display: flex;
    align-items: center;
    color: white;
    z-index: 1001;
}

.logo-nav img {
    height: 40px;
    width: auto;
    margin-right: 15px;
}

.logo-nav span {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.2rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #ffffff;
}

.hamburger {
    display: none;
    width: 28px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    border: none;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: white;
    border-radius: 0;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: top 0.25s ease-in-out, opacity 0.25s ease-in-out, transform 0.25s ease-in-out 0.25s;
}

.hamburger span:nth-child(1) { top: 0px; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

.hamburger.is-active span {
    transition: top 0.25s ease-in-out 0.25s, opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
}

.hamburger.is-active span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

.nav-buttons { display: flex; gap: 1rem; }

.nav-button {
    padding: 0.5rem 1.5rem;
    border-radius: 0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn {
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.contact-btn {
    background: linear-gradient(135deg, #4a5ff7, #6b7fff);
    color: white;
    border: 1px solid transparent;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 95, 247, 0.4);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #272F47;
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.mobile-nav.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-link {
    display: block;
    padding: 1rem;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.mobile-nav-link:last-child { border-bottom: none; }
.mobile-nav-link:hover { background: rgba(255, 255, 255, 0.1); }

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: linear-gradient(rgba(39, 47, 71, 0.4), rgba(39, 47, 71, 0.4)), url('images/mp.PNG');
    background-size: cover;
    background-position: center;
}

.hero-image-column { display: none; }
.hero-text-column { width: 100%; }

.hero-content {
    position: relative;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo-image {
    width: 200px;
    height: auto;
    margin-bottom: 3rem;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content-wrapper {
    position: relative;
    background-color: #EDEBE3;
    margin-top: 0;
}

.section-title {
    text-align: center;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0 auto 3.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background-color: #c9c6bd;
}

.hero-content .section-title::after { display: none; }
.hero-content .section-title { padding-bottom: 0; margin-bottom: 0; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.research-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    background: #ffffff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
    text-decoration: none;
    border: 1px solid #d8d6cf;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.research-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #c9c6bd;
}

.research-card:nth-child(1) { animation-delay: 0.1s; }
.research-card:nth-child(2) { animation-delay: 0.15s; }
.research-card:nth-child(3) { animation-delay: 0.2s; }
.research-card:nth-child(4) { animation-delay: 0.25s; }
.research-card:nth-child(5) { animation-delay: 0.3s; }
.research-card:nth-child(6) { animation-delay: 0.35s; }
.research-card:nth-child(7) { animation-delay: 0.4s; }
.research-card:nth-child(8) { animation-delay: 0.45s; }
@keyframes fadeIn { to { opacity: 1; } }

.research-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.4s ease;
}

.research-card:hover img { transform: scale(1.05); }

.research-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: #fff;
    padding: 1.5rem 1.2rem 1.2rem;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.research-card:hover .research-card-overlay { transform: translateY(0); }
.research-card-overlay h3 { margin: 0 0 0.5rem 0; font-size: 1.25rem; color: #ffffff; }

.research-card-overlay p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #e0e0e0;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}

.research-card:hover .research-card-overlay p { opacity: 0.9; }

.view-research-btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: #4a5ff7;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease 0.2s;
}

.research-card:hover .view-research-btn {
    opacity: 1;
    transform: translateY(0);
}

.view-research-btn:hover { background-color: #6b7fff; }

.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 0;
    border: 1px solid #d8d6cf;
    margin-top: 4rem;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out 0.8s both;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
}

.cta-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

.cta-description {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.email-link {
    color: #4a5ff7;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.email-link:hover { color: #272F47; transform: translateX(5px); }

.footer {
    background-color: #d8d6cf;
    padding: 4rem 2rem 3rem;
    border-top: 1px solid #c9c6bd;
}

.footer-container { max-width: 1400px; margin: 0 auto; }
.footer-address { color: #555; line-height: 1.7; font-size: 0.9rem; margin-bottom: 2.5rem; }
.footer-copyright { font-size: 0.9rem; color: #6c757d; }

.cta-button {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    border-radius: 0;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #4a5ff7, #6b7fff);
    color: white;
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 95, 247, 0.4);
}

.philosophy-quadrant-section {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    width: 100%;
    background-color: #d8d6cf;
}

.quadrant {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease;
    min-height: 50vh;
}

.quadrant-content { max-width: 500px; width: 100%; }
.quadrant.quad-1 { background-color: #d8d6cf; color: #2c3e50; }

/* --- THIS IS THE MODIFIED RULE --- */
.quadrant.quad-2 { 
    background-color: #FFFFFF; /* Changed from #EDEBE3 to white */
    color: #2c3e50; 
}
/* --- END OF MODIFICATION --- */

.quadrant.quad-3 { background-color: #EDEBE3; color: #2c3e50; }
.quadrant.quad-4 { background-color: #272F47; color: #ffffff; }

.quadrant-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto 2rem auto;
    display: block;
}

.quadrant-quote {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.4;
    font-style: italic;
    margin: 0;
    border: none;
    padding: 0;
}

.quadrant-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.2rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #6c757d;
    margin-bottom: 2rem;
}

.quadrant.quad-4 .quadrant-title { color: rgba(255, 255, 255, 0.7); }

.quadrant p {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

.quadrant.quad-1 .quadrant-title { margin-bottom: 2rem; }
.quadrant.quad-1 .quadrant-quote { margin-top: -2rem; }
.quadrant.quad-4 p { color: rgba(255, 255, 255, 0.8); }

/* Integrated Search and Pong Styles */
:root {
    --site-navy: #272F47;
    --site-off-white: #EDEBE3;
}

#search-section-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    margin-bottom: 1.5rem;
}

#search-container { position: relative; width: 100%; }

#search-bar-wrapper {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 50px;
    border: 1px solid #EAEAEA;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    padding: 8px 10px 8px 25px;
    transition: box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

#search-bar-wrapper:focus-within { box-shadow: 0 5px 20px rgba(0,0,0,0.08); }

#searchBox {
    width: 100%;
    border: none;
    outline: none;
    background-color: transparent;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 2;
}

/* --- DEFINITIVE FIX FOR FADING ANIMATION --- */
#placeholder-container {
    position: absolute;
    top: 0;
    left: 25px;
    right: 62px;
    bottom: 0;
    display: flex;
    align-items: center;
    pointer-events: none;
}

#animated-placeholder {
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: #BDBDBD;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.4s ease-in-out;
}

#animated-placeholder.fading-out {
    opacity: 0;
}

.is-focused #placeholder-container,
.has-value #placeholder-container {
    display: none;
}
/* --- END FIX --- */


#analyzeButton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #333;
    color: white;
    cursor: pointer;
    margin-left: 12px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    z-index: 3;
    position: relative;
}

#analyzeButton svg { width: 21px; height: 21px; }
#analyzeButton:hover { transform: scale(1.05); }

#analyzeButton:disabled {
    background-color: #BDBDBD;
    cursor: not-allowed;
    transform: scale(1);
}

#suggestions {
    display: none;
    list-style: none;
    padding: 8px 0;
    margin: 8px 0 0 0;
    border: 1px solid #EAEAEA;
    border-radius: 12px;
    position: absolute;
    width: 100%;
    background: white;
    z-index: 100; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.07);
    text-align: left;
    max-height: 40vh; 
    overflow-y: auto; 
}

#suggestions li {
    padding: 12px 25px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--site-navy);
}

#suggestions li:hover { background-color: #f9f9f9; }

#suggestions::-webkit-scrollbar {
  width: 8px;
}
#suggestions::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
#suggestions::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
#suggestions::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}


#status-message {
    margin-top: 30px;
    color: #ffffff;
    min-height: 24px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

#post-analysis-buttons {
    display: none;
    gap: 1rem;
    width: 100%;
    max-width: 700px;
    margin: 25px auto 0;
    justify-content: center;
    align-items: center;
}

#post-analysis-buttons button {
    background-color: #ffffff;
    color: var(--site-navy);
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#post-analysis-buttons button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

#pong-container {
    display: none;
    margin: 20px auto 0;
    width: 100%;
    max-width: 700px;
    aspect-ratio: 2 / 1;
    background: rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 12px;
}

.pong-paddle {
    position: absolute;
    width: 12px;
    height: 80px;
    background: var(--site-off-white);
    border-radius: 6px;
}

#paddleA { left: 10px; }
#paddleB { right: 10px; }
#ball {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--site-off-white);
    border-radius: 50%;
}

#pong-scores {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 50px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 3rem;
    color: rgba(237, 235, 227, 0.5);
    z-index: 1;
}

#net {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: repeating-linear-gradient(var(--site-off-white), var(--site-off-white) 10px, transparent 10px, transparent 20px);
    opacity: 0.2;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 1024px) {
    nav { padding: 0.5rem 1rem; }
    .nav-container {
        position: relative;
        justify-content: center;
    }
    .logo-nav { flex-direction: column; }
    .logo-nav img {
        height: 26px;
        margin-right: 0;
        margin-bottom: 3px;
    }
    .logo-nav span {
        font-size: 0.8rem;
        letter-spacing: 0.1em;
    }
    .hamburger {
        display: block;
        position: absolute;
        right: 1rem;
        left: auto;
        top: 50%;
        transform: translateY(-50%);
    }
    .nav-buttons { display: none; }
    .mobile-nav { display: block; }
    .hero-section { min-height: 600px; }
    .hero-logo-image { display: none; }
    .container { padding: 2rem 1rem; }
    .footer-container { text-align: center; }
    .research-grid {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
        grid-template-columns: none;
    }
    .research-grid .research-card {
        flex: 0 0 280px;
        width: 280px;
    }
    .research-grid::-webkit-scrollbar { display: none; }
    .research-grid { scrollbar-width: none; }

    #suggestions {
        max-height: 30vh;
    }
}

@media (max-width: 768px) {
    #post-analysis-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    .search-title {
        font-size: 0.9rem;
    }
}

/* --- DESKTOP STYLING --- */
@media (min-width: 1025px) {
    .hero-section {
        display: flex;
        background-image: none;
        background-color: #EDEBE3;
        text-align: left;
    }
    .hero-image-column {
        display: block;
        flex: 1 1 50%;
        height: 100vh;
        background-image: url('images/mp.PNG');
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }
    .hero-text-column {
        flex: 1 1 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 2rem 4rem;
        position: relative;
    }
    .hero-text-column::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(237, 235, 227, 0.6);
        z-index: 1;
    }
    .hero-content {
        align-items: center;
        text-align: center;
        animation: none;
        position: relative;
        z-index: 2;
        transform: translateX(-15%);
    }
    .hero-logo-image { width: 250px; }
    
    .search-title {
        color: #555;
        text-shadow: none;
    }

    #status-message {
        color: #555;
        text-shadow: none;
    }

    .philosophy-quadrant-section {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        border-top: 1px solid #c9c6bd;
        border-bottom: 1px solid #c9c6bd;
    }
    .quadrant {
        border-color: #c9c6bd;
        min-height: 0;
    }
    .quadrant-quote { font-size: 2.5rem; }
}