/* --- CSS Variables / Color Palette --- */
:root {
    /* Matcha Theme Colors */
    --matcha-bg: #d0e6c5;            /* Light matcha green page bg */
    --matcha-panel: #f2fcf0;        /* Very light green/white for panels */
    --matcha-accent: #2e542a;       /* Dark forest green for text and borders */
    --matcha-medium: #b4db9d;       /* Medium matcha green for accents */
    --matcha-highlight: #468c3a;    /* Vibrant green for hover/focus states */
    --matcha-shadow: rgba(46, 84, 42, 0.12); /* Light matching green shadow */
    
    /* Fonts */
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
    
    /* Layout */
    --border-radius: 5px;           /* 5px rounded borders as requested */
    --border-thickness: 3px;        /* Cartoony borders */
}

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

body {
    background-color: var(--matcha-bg);
    font-family: var(--font-body);
    color: var(--matcha-accent);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* --- Felt Texture Overlay --- */
.felt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('assets/felt-texture-overlay.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.14;                 /* Very light overlay to keep colors vibrant */
    mix-blend-mode: multiply;       /* Preserves the green base while adding texture */
}

/* --- Header --- */
.header {
    padding: 2.5rem 1rem 1.5rem;
    position: relative;
    text-align: center;
}

.header-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    display: inline-block;
}

.logo-wrap {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-wrap:hover {
    transform: scale(1.05) rotate(-1deg);
}

.main-logo {
    max-width: 320px;
    width: 100%;
    height: auto;
    display: block;
}

/* Decorative Leaves */
.decorative-leaf {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: var(--matcha-accent);
    opacity: 0.15;
    pointer-events: none;
}

.leaf-left {
    top: -10px;
    left: -60px;
    mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C22,3 11,5 17,8Z'/></svg>") no-repeat center;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C22,3 11,5 17,8Z'/></svg>") no-repeat center;
}

.leaf-right {
    bottom: -10px;
    right: -60px;
    transform: scaleX(-1) rotate(15deg);
    mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C22,3 11,5 17,8Z'/></svg>") no-repeat center;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C22,3 11,5 17,8Z'/></svg>") no-repeat center;
}

/* --- Main Layout --- */
.main-content {
    flex: 1;
    max-width: 780px;
    width: 90%;
    margin: 0 auto 4rem auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Panels --- */
.panel {
    background-color: var(--matcha-panel);
    border: var(--border-thickness) solid var(--matcha-accent);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 4px 12px var(--matcha-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--matcha-shadow);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px dashed rgba(46, 84, 42, 0.15);
    padding-bottom: 0.75rem;
}

.panel-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--matcha-accent);
}

.panel-body p {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.panel-body p:last-child {
    margin-bottom: 0;
}

.panel-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-type: disc;
}

.panel-body li {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

/* Specific styling for the Search Panel at the bottom */
.panel-search {
    background-color: #ebf5eb;      /* Medium shade of green for contrast */
    border-color: var(--matcha-accent);
}

.panel-search .panel-header h2 {
    font-size: 1.4rem;
}

.search-desc {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Search Form styling */
.search-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-form input[type="text"] {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1.05rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--matcha-accent);
    background-color: #f7fdf5;
    border: var(--border-thickness) solid var(--matcha-accent);
    border-radius: var(--border-radius);
    outline: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.search-form input[type="text"]::placeholder {
    color: rgba(46, 84, 42, 0.45);
    font-weight: normal;
}

.search-form input[type="text"]:focus {
    background-color: #ffffff;
    border-color: var(--matcha-highlight);
}

.search-btn {
    background-color: var(--matcha-accent);
    color: #ffffff;
    border: var(--border-thickness) solid var(--matcha-accent);
    border-radius: var(--border-radius);
    padding: 0 1.8rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: var(--matcha-highlight);
    border-color: var(--matcha-highlight);
    transform: scale(1.03);
}

.search-btn:active {
    transform: scale(0.97);
}

/* Feedback Message Styles */
.search-feedback {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 2px solid;
    animation: slideDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-feedback.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.search-feedback.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    animation: shake 0.4s ease;
}

.hidden {
    display: none !important;
}

.concluding-text {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
    border-top: 1px solid rgba(46, 84, 42, 0.1);
    padding-top: 1rem;
}

/* --- Footer --- */
.footer {
    background-color: #ffffff;
    border-top: var(--border-thickness) solid #e3ede0; /* slight green touch */
    padding: 3rem 1.5rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 400px;
}

.footer-logo-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-logo {
    max-width: 180px;
    height: auto;
    display: block;
}

.footer-motto {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--matcha-highlight);
    margin-left: 2px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.contact-email {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--matcha-accent);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
}

.contact-email:hover {
    color: var(--matcha-highlight);
    text-decoration: underline;
}

.footer-right {
    min-width: 200px;
}

.footer-right h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--matcha-accent);
    border-bottom: 2px dashed rgba(46, 84, 42, 0.15);
    padding-bottom: 0.25rem;
}

.socials-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--matcha-accent);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.2s, transform 0.2s;
}

.social-link:hover {
    color: var(--matcha-highlight);
    transform: translateX(3px);
}

.social-icon {
    width: 26px;
    height: auto;
    display: block;
    object-fit: contain;
}

.coming-soon {
    font-size: 1rem;
    color: rgba(46, 84, 42, 0.6);
    font-style: italic;
}

.footer-bottom {
    max-width: 900px;
    margin: 2rem auto 0 auto;
    border-top: 1px solid rgba(46, 84, 42, 0.08);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* --- Custom Modal Alert --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 84, 42, 0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    transition: opacity 0.2s ease;
}

.modal-content {
    background-color: var(--matcha-panel);
    border: var(--border-thickness) solid var(--matcha-accent);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 24px rgba(46, 84, 42, 0.25);
    transform: scale(0.9);
    animation: modalBounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.modal-title-icon {
    font-size: 1.5rem;
}

.modal-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--matcha-accent);
}

.modal-content p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.modal-close-btn {
    background-color: var(--matcha-accent);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.6rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.modal-close-btn:hover {
    background-color: var(--matcha-highlight);
    transform: translateY(-1px);
}

/* --- Animations --- */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalBounceIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Responsive adjust */
@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-btn {
        padding: 0.8rem;
    }

    .decorative-leaf {
        display: none;
    }
}
