/* ============================================================
   SUDDHA DHARMA MANDALAM - SHARED STYLESHEET
   Used by all pages of suddhayoga.com
   ============================================================ */

/* FACEBOOK & STABILITY FIXES */
html { -webkit-text-size-adjust: 100% !important; text-size-adjust: 100% !important; }
* { word-break: keep-all !important; hyphens: none !important; box-sizing: border-box; }

/* BODY & FONT */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f7f9fb;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* HEADER SIZES */
.header-mantra { font-size: 28px !important; }
.header-title { font-size: 20px !important; }

@media (max-width: 640px) {
    .header-mantra { font-size: 4.5vw !important; }
    .header-title { font-size: 3.2vw !important; }
    main h1 { font-size: 24px !important; }
}

/* NAVIGATION LINKS */
.nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: #ffffff !important;
    white-space: nowrap;
    transition: all 0.2s;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #0f766e;
    color: #facc15 !important;
}

/* ACTIVE NAV LINK (current page) */
.nav-link.active {
    background-color: #0f766e;
    color: #facc15 !important;
    font-weight: 700;
}

.full-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* DIGITAL LIBRARY BUTTON */
a[href*="historical-magazine"] {
    background-color: #f87171 !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 9999px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    display: inline-block !important;
}

/* EDGE BROWSER COMPATIBILITY - EXPLICIT COLORS */
.bg-teal-600 { background-color: #0d9488 !important; }
.bg-teal-700 { background-color: #0f766e !important; }
.bg-teal-500 { background-color: #14b8a6 !important; }
.bg-teal-50  { background-color: #f0fdfa !important; }
.bg-white    { background-color: #ffffff !important; }
.bg-gray-50  { background-color: #f9fafb !important; }
.bg-yellow-50 { background-color: #fefce8 !important; }

.text-yellow-400 { color: #facc15 !important; }
.text-yellow-500 { color: #eab308 !important; }
.text-white      { color: #ffffff !important; }
.text-teal-600   { color: #0d9488 !important; }
.text-teal-700   { color: #0f766e !important; }
.text-teal-800   { color: #115e59 !important; }
.text-gray-700   { color: #374151 !important; }
.text-gray-100   { color: #f3f4f6 !important; }

.border-teal-500 { border-color: #14b8a6 !important; }
.border-teal-600 { border-color: #0d9488 !important; }
.border-gray-100 { border-color: #f3f4f6 !important; }
.border-l-4      { border-left-width: 4px !important; }

/* CRITICAL FALLBACKS FOR EDGE */
header { background-color: #0d9488 !important; }
footer { background-color: #0f766e !important; }
nav a  { color: white !important; }
.header-mantra, .header-title { color: #facc15 !important; }

/* ============================================================
   BREADCRUMB NAVIGATION
   ============================================================ */
.breadcrumb {
    font-size: 0.85rem;
    color: #6b7280;
    padding: 0.5rem 0 1rem 0;
}

.breadcrumb a {
    color: #0d9488;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.4rem;
    color: #9ca3af;
}

/* ============================================================
   PURE CSS ACCORDIONS (no JavaScript needed)
   ============================================================ */
.accordion-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.accordion-toggle {
    display: none;
}

.accordion-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: #f9fafb;
    cursor: pointer;
    font-weight: 600;
    color: #0f766e;
    transition: background-color 0.2s;
}

.accordion-label:hover {
    background-color: #f0fdfa;
}

.accordion-label::after {
    content: '+';
    font-size: 1.25rem;
    transition: transform 0.2s;
}

.accordion-toggle:checked + .accordion-label {
    background-color: #f0fdfa;
    color: #115e59;
}

.accordion-toggle:checked + .accordion-label::after {
    content: '−';
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 1.25rem;
    background-color: #ffffff;
}

.accordion-toggle:checked ~ .accordion-content {
    max-height: 9999px;
    padding: 1rem 1.25rem;
}

/* ============================================================
   BACK-TO-TOP BUTTON
   ============================================================ */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #0d9488;
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, background-color 0.2s;
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:hover {
    background-color: #0f766e;
}

/* ============================================================
   PRINT-FRIENDLY STYLES
   ============================================================ */
@media print {
    header, footer, nav, #back-to-top, .breadcrumb { display: none !important; }
    body { background: white !important; color: black !important; }
    main { padding: 0 !important; }
    .shadow-2xl, .shadow-lg, .shadow-md, .shadow-sm { box-shadow: none !important; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.75rem; color: #555; }
    .accordion-content { max-height: none !important; padding: 1rem 1.25rem !important; }
}
