/* ==========================================================================
   pages.css - shared page parts
   --------------------------------------------------------------------------
   Purpose:     Cards, notices, link lists, map buttons, address and donate button.
   Used by:     Every page.
   ========================================================================== */

/* ---------- Contact links ---------- */
.contact-alt-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-alt-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(38, 79, 39, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.92rem;
}

.contact-alt-link:hover {
    background: var(--row-highlight-bg);
}

/* ---------- Visit Us and address ---------- */
.directions-section {
    margin-top: 35px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out;
    order: 7;
}

.directions-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 24px;
    text-align: center;
}

.address-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-color);
}

.mosque-full-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mosque-address-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

@media (min-width: 1024px) {
    .directions-section {
        break-inside: avoid;
        order: 0;
    }
}

/* ---------- Page layout and cards ---------- */
.page-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 20px 60px 20px;
}

.page-hero {
    margin-bottom: 24px;
}

.page-title {
    font-size: 2rem;
    color: var(--text-primary);
    line-height: 1.15;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.page-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.5;
}

.page-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.page-card + .page-card {
    margin-top: -4px;
}

.page-card h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.page-card h2:not(:first-child) {
    margin-top: 22px;
}

.page-card p {
    color: var(--text-primary);
    line-height: 1.75;
    margin-bottom: 14px;
}

.page-card p:last-child {
    margin-bottom: 0;
}

.page-card ul,
.page-card ol {
    padding-left: 20px;
    margin-bottom: 14px;
}

.page-card li {
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 9px;
}

.page-card li:last-child {
    margin-bottom: 0;
}

.page-note {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 6px;
}

.page-divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
    border: none;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row-label {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.info-row-value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.two-col-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .page-container {
        max-width: 720px;
        padding: 44px 32px 70px 32px;
    }

    .page-title {
        font-size: 2.3rem;
    }

    .two-col-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .page-container {
        max-width: 780px;
        padding: 56px 40px 80px 40px;
    }
}

@media (max-width: 1023px) {
    .page-container {
        padding-left: max(20px, env(safe-area-inset-left, 0px));
        padding-right: max(20px, env(safe-area-inset-right, 0px));
    }
}

@media (max-width: 767px) {
    .page-hero.center-on-mobile {
        text-align: center;
    }
}

/* ---------- Timetable notice ---------- */
.timetable-notice {
    margin: 0 0 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    background: #F2E8D7;
    color: #264F27;
    font-size: 0.85rem;
    line-height: 1.4;
    border: 1px solid rgba(38,79,39,0.25);
}

/* ---------- Link cards ---------- */
.link-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.link-card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.link-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.link-card-url {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

@media (hover: none) {
    .link-card:hover {
        transform: none;
    }
}

/* ---------- Map buttons ---------- */
.navigation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.nav-card {
    background: rgba(38, 79, 39, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    text-align: left;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease, background-color 0.25s ease;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

.nav-details {
    display: flex;
    flex-direction: column;
}

.nav-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.nav-action {
    font-size: 0.8rem;
    margin-top: 2px;
    color: var(--text-muted);
}

.nav-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.nav-card:hover .nav-icon {
    transform: scale(1.08);
}

.nav-card.google-maps:hover {
    border-color: rgba(66, 133, 244, 0.3);
    background: rgba(66, 133, 244, 0.04);
}

.nav-card.google-maps:hover .nav-icon {
    color: #ffffff;
}

.nav-card.apple-maps:hover {
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.04);
}

.nav-card.apple-maps:hover .nav-icon {
    color: #ffffff;
}

/* White tile so the full-colour map icons show; no colour swap on hover */
.nav-icon.nav-icon-brand,
.nav-card.google-maps:hover .nav-icon.nav-icon-brand,
.nav-card.apple-maps:hover .nav-icon.nav-icon-brand {
    width: 46px;
    height: 46px;
    padding: 6px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

@media (max-width: 480px) {
    .navigation-grid {
        grid-template-columns: 1fr;
    }
}

@media (hover: none) {
    .nav-card:hover {
        transform: none;
    }
}

/* ---------- Map ---------- */
.map-embed-wrapper {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.map-embed-wrapper iframe {
    width: 100%;
    height: 320px;
    border: 0;
    display: block;
}

.map-consent {
    height: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    padding: 1.5rem;
    text-align: center;
    background: #F2E8D7;
    color: #264F27;
}

.map-consent p {
    margin: 0;
    max-width: 34rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

.map-consent-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1.6rem;
    font: inherit;
    font-weight: 600;
    background: #264F27;
    color: #fff;
    cursor: pointer;
}

.map-consent-btn:hover,
.map-consent-btn:focus-visible {
    background: #1d3a1e;
}

.map-consent-link {
    color: #264F27;
    font-weight: 600;
}

/* ---------- Jumu'ah times and bank details ---------- */
.season-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
}

.season-card {
    background: rgba(38, 79, 39, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.season-card-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.season-card-times {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--accent);
}

.bank-detail-card {
    background: rgba(38, 79, 39, 0.03);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 16px;
}

/* ---------- Donate button ---------- */
.donate-button-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #F5E5C0 0%, #D4B04C 100%);
    border: 1px solid rgba(212, 176, 76, 0.4);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(212, 176, 76, 0.15);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
}

.donate-button-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(212, 176, 76, 0.3);
    filter: brightness(1.03);
}

.donate-button-card:active {
    transform: translateY(-1px);
}

.heart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: #1C3A1F; /* Myrtle colour for contrast */
    animation: heartBeat 2s infinite ease-in-out;
}

.donate-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: #1C3A1F; /* Clear readable dark text */
    letter-spacing: 0.5px;
}

@media (hover: none) {
    .donate-button-card:hover {
        transform: none;
    }
}

/* ---------- Animations ---------- */
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}
