/*
Theme Name: Madara iOS Glass Final
Author: Madara Dev
Description: Fixed Mobile Toggle, Compact Spacing, Paragraph Tiles.
Version: 6.1
*/

/* ============================
   1. CORE & BACKGROUND
   ============================ */
:root {
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-tile: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.45);
    --glass-blur: blur(35px);
    --text-main: #000000;
    --radius-card: 35px;
    --radius-btn: 50px;
    --radius-tile: 20px;
}

html { box-sizing: border-box; -webkit-text-size-adjust: 100%; }
*, *:before, *:after { box-sizing: inherit; }

body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    color: var(--text-main);
    line-height: 1.5;
    background-color: #eef2f5;
    background-image: 
        radial-gradient(at 10% 10%, hsla(190,80%,70%,1) 0px, transparent 50%),
        radial-gradient(at 90% 90%, hsla(280,70%,75%,1) 0px, transparent 50%),
        radial-gradient(at 50% 50%, hsla(340,80%,75%,1) 0px, transparent 50%);
    background-attachment: fixed;
    background-size: cover;
    overflow-x: hidden;
    padding-top: 110px; 
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-tile); }

/* ============================
   2. LIQUID GLASS BUTTONS
   ============================ */
.glass-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-btn);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    color: #000; font-weight: 700; font-size: 13px;
    transition: all 0.2s ease;
    margin: 4px; 
}
.glass-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* ============================
   3. HEADER
   ============================ */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 10px 0;
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.header-logo {
    margin-bottom: 5px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

.desktop-nav {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;
}

/* Toggle hidden by default on Desktop */
.mob-toggle {
    display: none; 
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
    align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    z-index: 1001; /* High Z-Index to ensure clickability */
}
.mob-toggle svg { width: 22px; stroke: #000; }

/* ============================
   4. CONTENT (Compact Glass)
   ============================ */
.app-container {
    max-width: 1100px;
    margin: 0 auto 20px;
    padding: 0 15px;
    min-height: 60vh;
}

.post-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.1);
    
    border-radius: var(--radius-card);
    overflow: hidden;
    padding: 40px;
}

h1 {
    font-size: 36px; font-weight: 800; text-align: center;
    margin-bottom: 5px; letter-spacing: -1px; line-height: 1.2;
}
.meta-info {
    display: block; text-align: center; 
    font-size: 12px; font-weight: 700; color: #666; 
    text-transform: uppercase; margin-bottom: 30px;
}

/* PARAGRAPH TILES */
.entry-content { width: 100%; }

.entry-content p {
    background: var(--glass-tile);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 20px;
    margin-bottom: 12px;
    border-radius: var(--radius-tile);
    font-size: 17px;
    color: #111;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); 
}

.entry-content h2, .entry-content h3 {
    text-align: center; margin-top: 35px; margin-bottom: 15px;
    font-size: 24px; font-weight: 800;
}

.entry-content img {
    margin: 25px auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* ============================
   5. FOOTER
   ============================ */
.site-footer {
    max-width: 1100px; margin: 0 auto 30px;
    padding: 20px;
    text-align: center;
}
.footer-logo img {
    height: 30px; width: auto; margin: 0 auto 20px;
    filter: grayscale(100%) opacity(0.6);
}
.footer-links {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    margin-bottom: 20px;
}
.copyright { font-size: 12px; color: #888; font-weight: 500; }

/* ============================
   6. MOBILE VIEW (Fixes & Zero Spacing)
   ============================ */
.glass-drawer {
    position: fixed; inset: 0; 
    background: rgba(255,255,255,0.96); backdrop-filter: blur(40px);
    z-index: 9999; display: flex; flex-direction: column; 
    align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.glass-drawer.active { opacity: 1; pointer-events: auto; }
.drawer-menu { display: flex; flex-direction: column; gap: 15px; width: 80%; }
.drawer-link {
    display: block; text-align: center;
    padding: 15px; border-radius: 30px;
    background: #f0f2f5; font-weight: 700; font-size: 18px; color: #000;
}

@media (max-width: 900px) {
    /* 1. FORCE TOGGLE VISIBLE (This was missing) */
    .mob-toggle { display: flex !important; }
    
    /* 2. Hide Desktop Nav */
    .desktop-nav { display: none !important; }
    
    /* 3. Header Adjustment */
    .site-header { 
        padding: 5px 0; 
        background: rgba(255,255,255,0.85);
        border-bottom: 1px solid rgba(255,255,255,0.5);
        height: 60px;
        flex-direction: row; justify-content: center;
    }
    
    /* 4. Compact Layout */
    body { padding-top: 75px; }
    
    .app-container {
        padding: 0 !important;
        width: 100% !important; margin: 0 0 20px 0;
    }
    .post-card {
        border-radius: 30px 30px 0 0;
        padding: 25px 15px;
        min-height: auto;
        border-left: none; border-right: none;
    }
    
    h1 { font-size: 26px; }
}