/* gmpipo Modern Editorial Design System
   Color Palette: Emerald & Deep Slate
*/

:root {
    --bg: #ffffff;
    --text: #0f172a;
    --accent: #10b981;
    --accent-dark: #059669;
    --muted: #64748b;
    --glass: rgba(255, 255, 255, 0.85);
    --border: #f1f5f9;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* 1. STICKY FOOTER CORE LOGIC */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    /* Flexbox settings for sticky footer */
    display: flex;
    flex-direction: column;
}

.main-wrapper {
    flex: 1 0 auto;
    /* This section grows to fill space, pushing footer down */
}

.main-footer {
    flex-shrink: 0;
    /* Ensures footer maintains its height */
    padding: 60px 0;
    border-top: 1px solid var(--border);
    background-color: #fcfcfc;
    text-align: center;
}

/* 2. NAVIGATION (GLASSMORPHISM) */
.glass-nav {
    height: 80px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hero-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

@media (max-width: 1400px) and (min-width: 991px) {
    .hero-footer {
        flex-wrap: wrap;            /* wrap allow */
        row-gap: 8px;
    }

    .hero-date {
        width: 100%;                /* date full width */
        font-size: 13px;
        opacity: 0.85;
    }

    .hero-footer a.btn-editorial {
        padding:14px;
        font-size: 13px;
        white-space: nowrap;
    }
}

.brand-logo {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -1px;
}

.brand-logo span {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    margin-left: 30px;
}

.nav-menu a:hover {
    color: var(--accent);
}


/* 3. HOME HERO SECTION */
.home-hero {
    padding: 100px 0;
    background: radial-gradient(circle at top right, #f0fdf4, #ffffff);
}

.featured-hero-card {
    max-width: 850px;
}

.hero-label {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}

.featured-hero-card h1 {
    font-size: 4rem;
    line-height: 1.05;
    margin-bottom: 2rem;
    letter-spacing: -3px;
}

.featured-hero-card p {
    font-size: 1.35rem;
    color: var(--muted);
    margin-bottom: 3rem;
    max-width: 700px;
}

.btn-read {
    background: var(--text);
    color: white;
    padding: 18px 40px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-read:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 4. STORY GRID */
.stories-grid {
    padding: 80px 0;
}

.grid-header {
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.masonry-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.story-card {
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 32px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #fff;
}

.story-card:hover {
    border-color: var(--accent);
    transform: scale(1.02);
    box-shadow: var(--shadow);
}

.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.story-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.card-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
}

/* 5. SINGLE POST STYLING */
.container-narrow {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 25px;
}

.post-header-wide {
    padding: 100px 0 60px;
    text-align: center;
}

.post-title-main {
    font-size: 3.5rem;
    letter-spacing: -2px;
    margin-bottom: 2rem;
}

.content-body {
    font-size: 1.25rem;
    line-height: 1.9;
    color: #334155;
}

/* 6. PROGRESS BAR */
#progress-container {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 1001;
}

#progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
}

/* 7. FOOTER STYLING */
.main-footer p {
    color: var(--muted);
    font-weight: 500;
}

/* --- UPDATED COLORED FOOTER --- */

.main-footer {
    flex-shrink: 0;
    background-color: #0f172a;
    /* Deep Slate */
    color: #f8fafc;
    padding: 80px 0 40px;
    margin-top: 0;
    /* Sticky footer logic handles spacing */
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
    text-align: left;
}

.footer-brand .brand-logo.light {
    color: #ffffff;
    display: block;
    margin-bottom: 20px;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 300px;
    font-size: 0.95rem;
}

.footer-content h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 700;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: var(--accent);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-circle {
    width: 40px;
    height: 40px;
    background: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s;
    border: 1px solid #334155;
}

.social-circle:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom-bar {
    padding-top: 40px;
    border-top: 1px solid #1e293b;
    text-align: center;
}

.footer-bottom-bar p {
    color: #64748b;
    font-size: 0.85rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto;
    }

    .social-icons {
        justify-content: center;
    }
}

/* --- Post Page Refined Styles --- */

.post-page {
    background: #fff;
    padding-bottom: 100px;
}

/* 1. Hero Section */
.post-hero {
    position: relative;
    padding: 120px 0 80px;
    background: #0f172a; /* Fallback for when no image exists */
    color: white;
    margin-bottom: 60px;
    overflow: hidden;
}

.hero-image-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4; /* Darkens image to make text readable */
}

.hero-content {
    position: relative;
    z-index: 2;
}

.post-display-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 20px 0;
    letter-spacing: -0.02em;
}

.post-excerpt {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* 2. Content Typography (The most important part) */
.rich-content-wrapper {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #334155;
    font-family: 'Inter', Georgia, serif;
}

/* Styles for the HTML tags you enter in Admin */
.rich-content-wrapper p { margin-bottom: 1.8rem; }
.rich-content-wrapper h2 { font-size: 2rem; margin: 3rem 0 1rem; color: #0f172a; }
.rich-content-wrapper h3 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.rich-content-wrapper img { width: 100%; border-radius: 12px; margin: 2rem 0; }
.rich-content-wrapper blockquote {
    border-left: 4px solid #4f46e5;
    padding-left: 24px;
    font-style: italic;
    font-size: 1.4rem;
    color: #475569;
    margin: 3rem 0;
}

/* 3. Author Strip */
.post-author-strip {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mini-avatar {
    width: 48px; height: 48px;
    background: #4f46e5;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}

.meta-details { display: flex; flex-direction: column; font-size: 0.9rem; }
.a-name { font-weight: 700; }
.a-date { opacity: 0.7; }

/* 4. Footer Modern */
.author-card-modern {
    margin-top: 80px;
    padding: 40px;
    background: #f8fafc;
    border-radius: 24px;
    display: flex;
    gap: 25px;
}

.ac-avatar {
    width: 64px; height: 64px;
    background: #1e293b; color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700;
}

/* --- EDITORIAL HOME DESIGN --- */

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Hero Section */
.editorial-hero { padding: 60px 0; background: #fff; }

.hero-main-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
    background: #f8fafc;
    border-radius: 30px;
    overflow: hidden;
    padding: 40px;
}

.hero-img-box { position: relative; border-radius: 20px; overflow: hidden; height: 450px; }
.hero-img-box img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.hero-tag { 
    position: absolute; top: 20px; left: 20px; background: #4f46e5; color: white; 
    padding: 6px 15px; border-radius: 50px; font-size: 0.7rem; font-weight: 800; 
}

.hero-category { color: #4f46e5; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
.hero-text-box h1 { font-size: 3rem; margin: 15px 0; line-height: 1.1; color: #0f172a; }
.hero-text-box p { color: #64748b; font-size: 1.1rem; line-height: 1.6; margin-bottom: 30px; }

.btn-editorial {
    background: #0f172a; color: white; text-decoration: none; padding: 15px 30px;
    border-radius: 12px; font-weight: 600; transition: 0.3s;
}
.btn-editorial:hover { background: #4f46e5; transform: translateY(-3px); }

/* Magazine Grid */
.feed-section { padding-bottom: 100px; }
.section-header { margin-bottom: 40px; display: flex; align-items: center; gap: 20px; }
.h-line { height: 2px; flex: 1; background: #f1f5f9; }

.blog-magazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.mag-card { display: flex; flex-direction: column; }
.mag-img-link { 
    position: relative; height: 240px; border-radius: 18px; overflow: hidden; margin-bottom: 20px; 
}
.mag-img-link img { width: 100%; height: 100%; object-fit: cover; transition: 0.4s; }
.mag-card:hover .mag-img-link img { transform: scale(1.05); }

.mag-cat { 
    position: absolute; bottom: 15px; left: 15px; background: rgba(255,255,255,0.9);
    padding: 4px 12px; border-radius: 8px; font-size: 0.7rem; font-weight: 700; color: #0f172a;
}

.mag-card h3 { font-size: 1.4rem; margin: 10px 0; line-height: 1.3; }
.mag-card h3 a { text-decoration: none; color: #1e293b; transition: 0.2s; }
.mag-card h3 a:hover { color: #4f46e5; }

.mag-card p { color: #64748b; font-size: 0.95rem; line-height: 1.6; margin-bottom: 15px; }
.mag-more { color: #4f46e5; font-weight: 700; text-decoration: none; font-size: 0.85rem; }

/* Responsive */
@media (max-width: 992px) {
    .hero-main-card { grid-template-columns: 1fr; padding: 20px; }
    .hero-img-box { height: 300px; }
    .hero-text-box h1 { font-size: 2rem; }
}   

/* --- Return to Feed Button Design --- */

.post-footer-nav {
    margin-top: 60px;
    padding-top: 40px;
}

.footer-divider {
    width: 60px;
    height: 4px;
    background: #4f46e5; /* Your primary brand color */
    margin-bottom: 30px;
    border-radius: 2px;
}

.btn-return-feed {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    padding: 15px 30px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn-return-feed .btn-icon {
    font-size: 1.5rem;
    color: #4f46e5;
    transition: transform 0.3s ease;
}

.btn-return-feed .btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.btn-return-feed .top-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-return-feed .main-label {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

/* Hover Effects */
.btn-return-feed:hover {
    background: #f8fafc;
    border-color: #4f46e5;
    transform: translateX(-5px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.1);
}

.btn-return-feed:hover .btn-icon {
    transform: translateX(-5px);
}

.truncate-5 {
    display: -webkit-box;
    -webkit-line-clamp: 5;      /* max 5 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.6;
}

/* <-- 404 page css start --> */

.error-wrapper {
    min-height: 85vh; /* Screen height ke hisab se adjust */
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #f8f9ff 0%, #ffffff 100%);
    padding: 20px; /* Mobile par sides se gap ke liye */
}
.error-container {
    text-align: center;
    width: 100%;
    max-width: 600px;
}
.error-code {
    font-size: clamp(80px, 25vw, 150px); /* Responsive Font: Screen ke sath badlega */
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    letter-spacing: -2px;
}
.error-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(22px, 5vw, 32px); /* Responsive Title */
    color: #1f2937;
    margin-bottom: 15px;
}
.error-text {
    color: #6b7280;
    font-size: clamp(15px, 3.5vw, 18px); /* Responsive Text */
    max-width: 450px;
    margin: 0 auto 30px;
    line-height: 1.6;
}
.btn-home {
    background: #3b82f6;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
    white-space: nowrap; /* Button text wrap nahi hoga */
}
.btn-home:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(59, 130, 246, 0.3);
    color: white;
}

/* Small Screen Specific Adjustments */
@media (max-width: 480px) {
    .error-wrapper {
        min-height: 70vh;
    }
    .error-code {
        margin-bottom: 10px;
    }
    .btn-home {
        width: 100%; /* Mobile par full width button */
        max-width: 250px;
    }
}

/* Add this specific adjustment to your 404.ejs style block */
@media (max-width: 420px) {
    .error-code {
        font-size: 80px; /* Override clamp if it stays too big */
        letter-spacing: -2px;
    }
    .error-title {
        font-size: 20px;
    }
    .error-text {
        font-size: 14px;
        padding: 0 10px;
    }
    .btn-home {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%; /* Full width button for easier tapping */
    }
}

/* <-- 404 page css end --> */

@media (max-width: 768px) {
    .truncate-5 {
        -webkit-line-clamp: 3;
    }
}

/* Update these in your style.css */
@media (max-width: 480px) {
    .nav-container {
        height: auto;
        padding: 10px 0;
    }
    .glass-nav {
        height: auto; /* Allow nav to grow */
    }
    .nav-menu {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .nav-dot {
        display: none; /* Remove dots on mobile to save space */
    }
    .brand-logo img {
        width: 60px; /* Smaller logo for mobile */
    }
}

/* Update your Footer CSS */
@media (max-width: 600px) {
    .footer-content {
        grid-template-columns: 1fr; /* Single column stack */
        gap: 30px;
        text-align: center;
    }
    .footer-brand p {
        margin: 0 auto;
    }
    .social-icons {
        justify-content: center;
    }
}

/* Add to global style.css */
@media (max-width: 350px) {
    .container {
        width: 95%; /* Give more room on tiny screens */
        padding: 0 10px;
    }
    h1, .post-display-title {
        font-size: 1.8rem !important; /* Force smaller titles */
    }
}   

/* Container must be relative */
.nav-category {
    position: relative;
    padding: 29px 0; /* Creates a hover bridge so dropdown doesn't disappear */
}

/* Updated Dropdown Wrapper */
.category-dropdown-wrapper {
    position: absolute;
    top: 100%; /* Exactly at the bottom of the nav link */
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* Centered and slightly offset */
    background: rgba(255, 255, 255, 0.98);
    min-width: 280px;
    max-height: 400px; /* Scrollable if you have many categories */
    overflow-y: auto;
    display: none;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    border-radius: 12px;
    border: 1px solid #eee;
    z-index: 1000;
    padding: 15px;
    transition: all 0.3s ease;
    opacity: 0;
}

/* Hover Logic for Desktop */
@media (min-width: 992px) {
    .nav-category:hover .category-dropdown-wrapper {
        display: block;
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* The Grid Inside */
.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr; /* Use 1fr 1fr if you want two columns */
    gap: 5px;
}

.dropdown-item {
    padding: 10px 15px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #007bff; /* Or your brand color */
}

.item-dot {
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
    margin-right: 10px;
}

.dropdown-item:hover .item-dot {
    background: #007bff;
}

/* Mobile Fixes */
@media (max-width: 991px) {
    .category-dropdown-wrapper {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        background: transparent;
        display: none;
        opacity: 1;
        border: none;
    }
    .category-dropdown-wrapper.active {
        display: block;
    }
}

/* ===== Mobile Header View Start ==== */
/* Hide desktop nav on mobile */
@media (max-width: 991px) {
    .nav-menu {
        display: none;
    }
}

/* Hamburger */
.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #000;
}

/* Overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transition: .3s;
    z-index: 998;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Slide Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: .3s;
    padding: 20px;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

/* Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* List */
.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.mobile-menu-list li {
    margin-bottom: 14px;
}

.mobile-menu-list a,
.mobile-dropdown span {
    text-decoration: none;
    color: #0b2b3c;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

/* Dropdown */
.mobile-dropdown ul {
    display: none;
    padding-left: 15px;
    margin-top: 8px;
}

.mobile-dropdown.active ul {
    display: block;
}

/* ===== Mobile Header View End ==== */

/* ===== Post detaile ipo detailes button start ==== */
    .ipo-cta-card {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 24px;
    margin: 30px 0;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.05);
}

.cta-icon {
    width: 54px;
    height: 54px;
    background: #2563eb;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.cta-content {
    flex-grow: 1;
}

.cta-content h4 {
    margin: 0 0 4px 0;
    font-weight: 700;
    color: #1e3a8a;
    font-size: 18px;
}

.cta-content p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.4;
}

.cta-button {
    background: #2563eb;
    color: white !important;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.cta-button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .ipo-cta-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .cta-button {
        width: 100%;
        justify-content: center;
    }
}
/* ===== Post detaile ipo detailes button End ==== */