/* ==============================
   COUNTRIES PORTAL & COUNTRY PAGE
   ============================== */

/* ---- Portal Grid ---- */
/* ==============================
   COUNTRIES PORTAL (INDEX PAGE)
   ============================== */

#countries-page {
    padding-top: 90px;
    padding-bottom: 40px;
}

#countries-page .container {
    max-width: 1100px;   /* narrower portal */
    margin: 0 auto;
}

/* Hero area */
#countries-page .countries-hero {
    text-align: center;
    margin-bottom: 20px;
}

#countries-page .countries-hero h1 {
    font-size: 2rem;
    margin-bottom: 6px;
}

#countries-page .countries-hero p {
    font-size: 0.95rem;
    color: #6b7280;
}

/* Search + count row */
.countries-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.countries-search-wrap {
    flex: 1;
    min-width: 220px;
}

#searchCountries {
    width: 100%;
    max-width: 360px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    font-size: 0.95rem;
}

.countries-count {
    font-size: 0.9rem;
    color: #6b7280;
}

/* 3-column responsive grid of country rows */
.countries-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 0;              /* rows sit right on the divider line */
}


@media (max-width: 1024px) {
    .countries-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .countries-grid {
        grid-template-columns: 1fr;
    }
}

/* Each clickable row */
/* Each clickable row, with subtle grey divider like time.now */
.country-card {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    text-decoration: none;
    color: #111827;
    font-size: 0.95rem;

    border: none;                          /* no full box */
    border-bottom: 1px solid #e5e7eb;      /* thin grey line divider */
    border-radius: 0;                      /* straight line */
    transition: background-color 0.15s ease, border-bottom-color 0.15s ease;
}

.country-card:hover {
    background-color: #f9fafb;
    border-bottom-color: #d1d5db;          /* slightly darker on hover */
}


.country-code {
    width: 40px;
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
}

.country-name {
    flex: 1;
    font-weight: 500;
    margin-right: 6px;
}

/* Right-hand meta: time + timezone */
.country-meta {
    text-align: right;
    font-size: 0.8rem;
    color: #6b7280;
}

.country-time-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.country-time {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
}

.country-tz {
    margin-top: 2px;
}


/* ---- Country Page Layout ---- */

.country-page {
     padding-top: 90px;   
    padding-bottom: 24px;
}

.country-hero {
     margin-top: 0;
    text-align: center;
}

.country-hero h1 {
    font-size: 2.1rem;
    margin-bottom: 6px;
}

.country-hero .country-flag {
    font-size: 56px;
    margin-bottom: 10px;
}

.timezone-info {
    font-size: 0.95rem;
    color: #6b7280;
}

/* Live clock + date */
.live-clock {
    font-size: 2rem;
    font-weight: 700;
    margin: 16px 0 6px;
    color: #111827;
}

.live-date {
    font-size: 0.95rem;
    color: #6b7280;
}

/* User vs country comparison */
.user-compare-box {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 0.92rem;
}

/* Main content split (info + map) */
.country-main-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1.5fr);
    gap: 24px;
    margin-top: 28px;
}

@media (max-width: 900px) {
    .country-main-row {
        grid-template-columns: 1fr;
    }
}

/* Info cards */
.info-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.info-card h2 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.info-card p {
    font-size: 0.95rem;
    color: #4b5563;
}

/* Sunrise / sunset */
.sun-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.sun-box {
    background: #f9fafb;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.88rem;
}

/* Major cities clocks */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.city-clock-card {
    background: #0f172a;
    color: #f9fafb;
    border-radius: 10px;
    padding: 10px 12px;
}

.city-name {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.city-time {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Map */
#countryMap {
    width: 100%;
    height: 260px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* Prayer times */
.prayer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 8px;
}

.prayer-table th,
.prayer-table td {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.prayer-note {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 6px;
}

/* SEO text block */
.country-seo-text {
    margin-top: 30px;
    line-height: 1.7;
    font-size: 0.96rem;
    color: #374151;
}

.country-seo-text h2 {
    margin-top: 18px;
    font-size: 1.1rem;
}


/* ==== Country header row: breadcrumb (left) + title (center) ==== */

/* ==== Country header row: breadcrumb (left) + centered title ==== */

.country-header-row {
    position: relative;
    margin-bottom: 20px;
    text-align: center;     /* centers the title */
    padding-top: 4px;
}

/* Title: truly centered in the page */
.country-title-inline {
    margin: 0;
    font-size: 2.1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    text-align: center;
}

.country-flag-inline {
    font-size: 2rem;
    line-height: 1;
    display: inline-block;
    transform: translateY(2px);
}

/* Breadcrumb: same row, pinned to the left */
.country-breadcrumb {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
}

.country-breadcrumb a {
    text-decoration: none;
    color: inherit;
}

.country-breadcrumb a:hover {
    text-decoration: underline;
    color: #374151;
}

.crumb-separator {
    opacity: 0.7;
}

.crumb-current {
    font-weight: 500;
    color: #111827;
}

/* Keep hero content centered as before */
.country-hero {
    margin-top: 0;
    text-align: center;
}

/* Mobile: stack breadcrumb above title so nothing overlaps */
@media (max-width: 768px) {
    .country-header-row {
        text-align: left;
    }

    .country-breadcrumb {
        position: static;
        transform: none;
        margin-bottom: 4px;
        font-size: 0.8rem;
    }

    .country-title-inline {
        font-size: 1.8rem;
        justify-content: flex-start;
        text-align: left;
    }

    .country-flag-inline {
        font-size: 1.6rem;
    }
}



/* ============================
   Country hero actions
   ============================ */
.country-hero-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.country-btn {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #111827;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.country-btn.secondary {
    background: #0f172a;
    color: #f9fafb;
    border-color: #0f172a;
}

.country-btn:hover {
    transform: translateY(-1px);
    border-color: #3b82f6;
    background-color: #f9fafb;
}

.country-btn.secondary:hover {
    background: #111827;
}

/* ============================
   Fullscreen clock overlay
   ============================ */
.country-fullscreen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.country-fullscreen-overlay.active {
    display: flex;
}

.country-fullscreen-inner {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.country-fullscreen-title {
    color: #e5e7eb;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.country-fullscreen-time {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 700;
    color: #f9fafb;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.country-fullscreen-date {
    font-size: 1rem;
    color: #9ca3af;
    margin-bottom: 20px;
}

.fullscreen-close-btn {
    border: 1px solid #6b7280;
    background: transparent;
    color: #e5e7eb;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.fullscreen-close-btn:hover {
    background: #f9fafb;
    color: #111827;
    border-color: #f9fafb;
}







/* Nearby Cities (Nearby Capitals) */
.country-nearby-section { margin-top: 18px; }

.nearby-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
  margin-top:12px;
}

.nearby-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  text-decoration:none;
  color:inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}

.nearby-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,.06);
}

.nearby-flag{ font-size:22px; line-height:1; }
.nearby-city{ font-weight:700; }
.nearby-country{ font-size:.92rem; opacity:.8; }
.nearby-distance{ font-size:.85rem; opacity:.7; margin-top:2px; }
