/* ============================================================
   DownloadEat.com — Page Styles (Country, City & Topic Pages)
   Maps the dash-separated HTML class names to gorgeous styles
   ============================================================ */

/* ---------- Country/City/Topic Hero ---------- */
.country-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + 3rem) 1.5rem 3rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy) 0%, #0d2137 50%, #102a44 100%);
}

.country-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0, 212, 170, 0.08) 0%, transparent 60%),
                linear-gradient(180deg, rgba(10, 22, 40, 0.3) 0%, rgba(10, 22, 40, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.country-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out;
}

.country-hero-flag {
    font-size: clamp(3rem, 6vw, 4rem);
    display: block;
    margin-bottom: 1.25rem;
    line-height: 1;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

.country-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.country-hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--gray-200);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.country-hero-badges,
.country-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.country-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    color: var(--gray-200);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition-base);
}

.country-hero-badge:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
}

.country-hero-badge svg {
    width: 14px;
    height: 14px;
    stroke: var(--teal);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    padding: 1rem 0;
    background: var(--off-white);
    border-bottom: 1px solid var(--gray-100);
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    color: var(--gray-300);
    font-size: 1rem;
    font-weight: 500;
}

.breadcrumb-list a {
    color: var(--teal-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-list a:hover {
    color: var(--teal);
    text-decoration: underline;
}

.breadcrumb-list [aria-current="page"] {
    color: var(--gray-500);
    font-weight: 500;
}

/* ---------- Page Layout ---------- */
.page-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.page-main {
    min-width: 0;
}

@media (min-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr 340px;
    }
}

/* ---------- Content Sections ---------- */
.content-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out backwards;
}

.content-section:nth-child(2) { animation-delay: 0.1s; }
.content-section:nth-child(3) { animation-delay: 0.15s; }
.content-section:nth-child(4) { animation-delay: 0.2s; }

.content-section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--teal);
    display: inline-block;
    line-height: 1.3;
}

.content-section-intro {
    font-size: 1.1rem;
    color: var(--gray-500);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.content-section p {
    color: var(--gray-500);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 0.98rem;
}

.content-section h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 600;
    color: var(--navy);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.content-section h3:first-child {
    margin-top: 0;
}

.content-section ul,
.content-section ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-xl);
    line-height: 1.8;
    color: var(--gray-500);
}

.content-section li {
    margin-bottom: 0.4rem;
}

.content-section li::marker {
    color: var(--teal);
}

.content-section a {
    color: var(--teal-dark);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-fast);
}

.content-section a:hover {
    color: var(--teal);
    border-bottom-color: var(--teal);
}

.content-section strong {
    color: var(--navy);
    font-weight: 600;
}

/* ---------- Tip Boxes (Gorgeous Redesign) ---------- */
.tip-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.75rem 0;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.tip-box:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.tip-box--tip {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.06) 0%, rgba(116, 185, 255, 0.12) 100%);
    border-color: var(--blue);
}

.tip-box--warning {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.06) 0%, rgba(255, 217, 61, 0.12) 100%);
    border-color: var(--gold);
}

.tip-box--success {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.06) 0%, rgba(0, 184, 148, 0.12) 100%);
    border-color: var(--green-success);
}

.tip-box--danger {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.06) 0%, rgba(255, 107, 107, 0.12) 100%);
    border-color: var(--coral);
}

.tip-box-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-top: 0.1rem;
}

.tip-box--tip .tip-box-icon {
    background: rgba(116, 185, 255, 0.15);
    color: var(--blue);
}

.tip-box--warning .tip-box-icon {
    background: rgba(255, 217, 61, 0.2);
    color: var(--gold-dark);
}

.tip-box--success .tip-box-icon {
    background: rgba(0, 184, 148, 0.15);
    color: var(--green-success);
}

.tip-box--danger .tip-box-icon {
    background: rgba(255, 107, 107, 0.15);
    color: var(--coral);
}

.tip-box-icon svg {
    width: 22px;
    height: 22px;
}

.tip-box-content {
    flex: 1;
    min-width: 0;
}

.tip-box-content h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--navy);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.tip-box-content p {
    font-size: 0.95rem;
    color: var(--gray-500);
    line-height: 1.7;
    margin: 0;
}

/* ---------- FAQ Accordion (Polished) ---------- */
.faq-list {
    margin-top: 1.5rem;
}

.faq-item {
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: var(--white);
    transition: all var(--transition-base);
}

.faq-item:hover {
    border-color: var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.faq-item__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    gap: 1rem;
    transition: all var(--transition-fast);
}

.faq-item__question:hover {
    background: var(--off-white);
    color: var(--teal-dark);
}

.faq-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    transition: transform var(--transition-base), color var(--transition-base);
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
    color: var(--teal);
}

.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-item__answer {
    max-height: 600px;
}

.faq-item__answer p {
    padding: 0 1.5rem 1.25rem;
    color: var(--gray-500);
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
}

/* ---------- App Cards (Dash-separated names) ---------- */
.app-card {
    padding: 1.75rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.app-card:hover {
    border-color: var(--teal);
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.1);
    transform: translateY(-2px);
}

.app-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.app-card-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.app-card-name {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

.app-card-type {
    font-size: 0.8rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.app-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.app-card-badge--recommended {
    background: rgba(0, 212, 170, 0.12);
    color: var(--teal-dark);
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.app-card-badge--local {
    background: rgba(253, 203, 110, 0.12);
    color: var(--gold-dark);
    border: 1px solid rgba(253, 203, 110, 0.25);
}

.app-card-badge--popular {
    background: rgba(116, 185, 255, 0.12);
    color: #2980b9;
    border: 1px solid rgba(116, 185, 255, 0.2);
}

.app-card-description {
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.app-card-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 600px) {
    .app-card-details {
        grid-template-columns: repeat(3, 1fr);
    }
}

.app-card-detail {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.app-card-detail-label {
    font-size: 0.72rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.app-card-detail-value {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--navy);
}

.app-card-detail--positive {
    color: var(--green-success) !important;
}

.app-card-detail--negative {
    color: var(--red-warning) !important;
}

.app-card-payability {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-100);
}

/* ---------- Download Pack Boxes ---------- */
.download-pack-box {
    background: linear-gradient(135deg, var(--navy), var(--navy-mid));
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    color: var(--white);
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.download-pack-box h3,
.download-pack-box h4 {
    color: var(--white);
    margin-bottom: 0.75rem;
}

.download-pack-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.download-pack-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0;
    color: var(--gray-300);
    font-size: 0.92rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.download-pack-list li:last-child {
    border-bottom: none;
}

.download-pack-list li::before {
    content: '→';
    color: var(--teal);
    font-weight: 700;
}

/* ---------- Section CTA (Topic/Country Pages) ---------- */
.section-cta {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.section-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -25%;
    width: 150%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(0, 212, 170, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.cta-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-content p {
    color: var(--gray-300);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    line-height: 1;
}

.btn--primary {
    background: var(--teal);
    color: var(--navy);
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

.btn--primary:hover {
    background: var(--teal-dark);
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 170, 0.4);
}

.btn--lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.btn--sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
}

/* ---------- Sidebar Styles ---------- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.sidebar-card:hover {
    box-shadow: var(--shadow-md);
}

.sidebar-card h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

/* ---------- Payability Score (Inline) ---------- */
.payability-score-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
}

.payability-score-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.payability-score-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--teal), var(--green-success));
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.payability-score-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--teal-dark);
    white-space: nowrap;
    min-width: 50px;
}

/* ---------- Quick Facts Grid ---------- */
.quick-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

@media (min-width: 600px) {
    .quick-facts {
        grid-template-columns: repeat(4, 1fr);
    }
}

.quick-fact {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
}

.quick-fact:hover {
    border-color: var(--teal);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.quick-fact-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: block;
}

.quick-fact-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-400);
    margin-bottom: 0.25rem;
    display: block;
    font-weight: 600;
}

.quick-fact-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
}

/* ---------- Section Badges ---------- */
.section-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--teal);
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

/* ---------- Tables (inside content sections) ---------- */
.content-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.92rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.content-section thead {
    background: var(--navy);
    color: var(--white);
}

.content-section th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.content-section td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
}

.content-section tbody tr:hover {
    background: var(--off-white);
}

.content-section tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 767px) {
    .country-hero {
        min-height: 340px;
        padding: calc(var(--header-height) + 2rem) 1.25rem 2.5rem;
    }

    .page-layout {
        padding: 1.5rem 1rem 3rem;
    }

    .tip-box {
        flex-direction: column;
        gap: 0.75rem;
    }

    .tip-box-icon {
        width: 36px;
        height: 36px;
    }

    .app-card {
        padding: 1.25rem;
    }

    .app-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .faq-item__question {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }

    .faq-item__answer p {
        padding: 0 1.25rem 1rem;
    }

    .content-section table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (min-width: 768px) {
    .app-card-details {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr 340px;
    }
}

/* ---------- Dark Mode Support ---------- */
@media (prefers-color-scheme: dark) {
    .content-section-title {
        color: var(--white);
    }

    .content-section h3 {
        color: var(--gray-200);
    }

    .content-section p {
        color: var(--gray-300);
    }

    .app-card {
        background: var(--navy-light);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .app-card-name {
        color: var(--white);
    }

    .app-card-detail-value {
        color: var(--gray-200);
    }

    .faq-item {
        background: var(--navy-light);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .faq-item__question {
        color: var(--white);
    }

    .faq-item__question:hover {
        background: rgba(255, 255, 255, 0.04);
    }

    .tip-box-content h4 {
        color: var(--white);
    }

    .tip-box-content p {
        color: var(--gray-300);
    }

    .breadcrumb {
        background: var(--navy-light);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .breadcrumb-list [aria-current="page"] {
        color: var(--gray-200);
    }

    .quick-fact {
        background: var(--navy-light);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .quick-fact-value {
        color: var(--white);
    }

    .sidebar-card {
        background: var(--navy-light);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .content-section strong {
        color: var(--white);
    }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Reduce animations for accessibility */
@media (prefers-reduced-motion: reduce) {
    .content-section {
        animation: none;
    }

    .country-hero-flag {
        animation: none;
    }

    .country-hero-content {
        animation: none;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .country-hero {
        min-height: auto;
        padding: 1rem;
        background: none !important;
    }

    .country-hero-title {
        color: #000;
        text-shadow: none;
    }

    .tip-box {
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    .faq-item__answer {
        max-height: none !important;
    }
}
