/* ================================================
   Political Portal - Responsive Modern Theme
   Mobile: 320-767px, Tablet: 768-1023px, Desktop: 1024px+
   ================================================ */

:root {
    --primary-color: var(--theme-primary, #1f6feb);
    --primary-gradient: linear-gradient(135deg, var(--theme-primary, #1f6feb), color-mix(in srgb, var(--theme-primary, #1f6feb) 56%, #14b8a6 44%));
    --accent-color: var(--theme-accent, #ef4444);
    --bg-color: var(--theme-site-bg, #07111f);
    --bg-gradient: linear-gradient(135deg, color-mix(in srgb, var(--bg-color) 86%, #020617 14%) 0%, color-mix(in srgb, var(--bg-color) 62%, #0f2a37 38%) 54%, color-mix(in srgb, var(--bg-color) 68%, #1f2937 32%) 100%);
    --text-main: var(--theme-body-text, #ffffff);
    --text-muted: rgba(255, 255, 255, 0.68);
    --glass-bg: rgba(255, 255, 255, 0.075);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-blur: blur(18px) saturate(145%);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --nav-height: 64px;
    --radius-lg: 8px;
    --radius-md: 8px;
    --radius-sm: 8px;
    --container-pad: clamp(1rem, 4vw, 2rem);
    --section-gap: clamp(2rem, 5vw, 4.5rem);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-family: var(--font-family);
    font-size: var(--theme-text-size, 16px);
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M30 0h1v60h-1zM0 30h60v1H0z'/%3E%3C/g%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    overflow-wrap: break-word;
}

p {
    overflow-wrap: anywhere;
}

a {
    color: #7dd3fc;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #99f6e4;
    text-decoration: none;
}

ul,
ol {
    padding-left: 1.2rem;
}

li + li {
    margin-top: 0.35rem;
}

img, picture, svg, video, canvas, iframe {
    max-width: 100%;
}

img, video {
    height: auto;
}

iframe {
    border: 0;
}

main.container {
    width: min(100% - (var(--container-pad) * 2), 1200px);
    max-width: 1200px;
    flex: 1 0 auto;
    position: relative;
    z-index: 1;
    padding: clamp(1rem, 3vw, 2rem) 0 var(--section-gap);
}

.card,
.glass-panel,
.bg-white,
.bg-light,
.card-header,
.card-footer,
.card-body,
.list-group-item {
    background: var(--glass-bg) !important;
    border-color: var(--glass-border) !important;
    color: var(--text-main) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
}

.card,
.glass-panel {
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.glass-panel:hover {
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
}

.card-body {
    padding: clamp(1rem, 2.5vw, 2rem);
}

.card-title {
    margin-bottom: 1rem;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.text-dark,
.text-body {
    color: var(--text-main) !important;
}

.text-muted {
    color: rgba(255, 255, 255, 0.58) !important;
}

.text-primary {
    color: #7dd3fc !important;
    text-shadow: 0 0 10px rgba(125, 211, 252, 0.22);
}

.text-secondary { color: #94a3b8 !important; }
.text-success { color: #34d399 !important; text-shadow: 0 0 10px rgba(52, 211, 153, 0.25); }
.text-danger { color: #f87171 !important; text-shadow: 0 0 10px rgba(248, 113, 113, 0.25); }
.text-warning { color: #fbbf24 !important; text-shadow: 0 0 10px rgba(251, 191, 36, 0.25); }
.text-info { color: #38bdf8 !important; text-shadow: 0 0 10px rgba(56, 189, 248, 0.25); }

.bg-primary,
.badge.bg-primary {
    background: var(--primary-gradient) !important;
    color: #fff !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.72rem 1.35rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    letter-spacing: 0;
    white-space: normal;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(31, 111, 235, 0.3);
}

.btn-primary:hover {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 14px 30px rgba(20, 184, 166, 0.34);
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    color: #fff;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: #fff !important;
    color: #fff;
}

.form-control,
.form-select {
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #14b8a6 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16) !important;
}

.form-control::placeholder,
.form-select::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    min-height: var(--nav-height);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(7, 17, 31, 0.88) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.navbar > .container {
    width: min(100% - (var(--container-pad) * 2), 1200px);
    max-width: 1200px;
    padding-right: 0;
    padding-left: 0;
}

.navbar-brand {
    min-width: 0;
    max-width: calc(100% - 4rem);
}

.navbar-brand img {
    width: auto;
    height: 40px;
    object-fit: contain;
}

.pp-brand-name {
    display: block;
    max-width: min(52vw, 340px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-toggler {
    flex-shrink: 0;
    border-color: rgba(255, 255, 255, 0.24);
    border-radius: var(--radius-sm);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.26);
}

.navbar-dark .navbar-nav .nav-link {
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.74);
    font-weight: 600;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
    max-width: calc(100vw - 2rem);
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    background: rgba(10, 30, 47, 0.98);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(20px);
}

.dropdown-item {
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
    white-space: normal;
}

.dropdown-item:hover {
    background: var(--primary-gradient);
    color: #fff;
}

.table {
    margin-bottom: 0;
    color: var(--text-main);
}

.table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.table td,
.table th {
    border-color: rgba(255, 255, 255, 0.1);
    background: transparent !important;
    vertical-align: middle;
}

.table thead th {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: #7dd3fc;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.alert {
    padding: 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    font-weight: 500;
}

.alert-success {
    border-color: rgba(52, 211, 153, 0.2) !important;
    background: rgba(52, 211, 153, 0.1) !important;
    color: #6ee7b7 !important;
}

.alert-danger {
    border-color: rgba(239, 68, 68, 0.2) !important;
    background: rgba(239, 68, 68, 0.1) !important;
    color: #fca5a5 !important;
}

.badge {
    padding: 0.5em 1em;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.rounded-5 {
    border-radius: var(--radius-lg) !important;
}

.shadow-lg {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.animate-up:hover,
.hover-up:hover {
    transform: translateY(-2px);
}

.max-width-600 {
    max-width: 600px;
}

.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.section-header {
    gap: 1rem;
}

.pp-hero {
    min-height: clamp(360px, 54vh, 560px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(15, 42, 55, 0.94), rgba(32, 23, 47, 0.82)),
        url("../img/placeholder.jpg") center/cover no-repeat;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.pp-hero .lead {
    max-width: 62ch;
    font-size: clamp(1rem, 2vw, 1.22rem);
}

.pp-hero h1 {
    font-size: clamp(2.3rem, 7vw, 4.8rem);
    color: #fff;
}

.pp-hero h1 span,
.pp-hero h2,
.pp-hero h3,
.pp-hero .lead {
    color: #fff !important;
}

.pp-hero .lead {
    opacity: 0.82;
}

.pp-card-img {
    display: block;
    width: 100%;
    height: clamp(190px, 24vw, 240px) !important;
    object-fit: cover;
}

.glass-panel:hover .pp-card-img {
    transform: scale(1.035);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.3);
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.5);
}

hr {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.list-group-item {
    border-color: rgba(255, 255, 255, 0.06) !important;
    background: transparent !important;
    color: #fff !important;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

.footer {
    flex-shrink: 0;
}

.page-hero,
.surface-section {
    border: 1px solid var(--glass-border);
    border-radius: calc(var(--radius-lg) * 2);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.26);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.page-hero {
    padding: clamp(2rem, 5vw, 4rem);
}

.page-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.85rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.09);
    color: #c4f1ff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-hero h1 {
    font-size: clamp(2.1rem, 7vw, 4.2rem);
    color: #fff !important;
    margin-bottom: 1rem;
}

.page-hero .lead,
.content-rich {
    color: var(--text-main);
}

.content-rich {
    line-height: 1.8;
}

.content-rich p:last-child {
    margin-bottom: 0;
}

.icon-stack {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.social-circle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    background: rgba(255,255,255,0.05);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.social-circle:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 1.15rem;
    border-radius: 1.1rem;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}

.stat-chip strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
}

.stat-chip span {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Mobile: 320px - 767px */
@media (max-width: 767.98px) {
    :root {
        --nav-height: 60px;
        --container-pad: 1rem;
    }

    main.container,
    .navbar > .container {
        width: min(100% - 2rem, 100%);
    }

    main.container {
        padding-top: 1rem;
        padding-bottom: 2.5rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    h1 { font-size: clamp(1.85rem, 10vw, 2.5rem) !important; }
    h2 { font-size: clamp(1.45rem, 7vw, 1.85rem) !important; }
    .display-4 { font-size: clamp(2rem, 11vw, 2.6rem) !important; }
    .display-3 { font-size: clamp(2.1rem, 12vw, 3rem) !important; }
    .display-1 { font-size: clamp(2.4rem, 14vw, 3.3rem) !important; }

    .pp-brand-name {
        max-width: calc(100vw - 6.5rem);
        font-size: 0.98rem;
    }

    .navbar-collapse {
        max-height: calc(100vh - 86px);
        margin-top: 0.75rem;
        padding: 0.75rem;
        overflow-y: auto;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: var(--radius-lg);
        background: rgba(7, 17, 31, 0.96);
    }

    .navbar-nav {
        gap: 0.25rem;
    }

    .navbar-dark .navbar-nav .nav-link,
    .navbar-nav .btn {
        width: 100%;
        justify-content: flex-start;
        padding: 0.72rem 0.9rem;
    }

    .pp-hero {
        min-height: auto;
        margin-bottom: 2rem !important;
        padding: 2rem 1.25rem !important;
        border-radius: var(--radius-md) !important;
    }

    .pp-hero h1 {
        font-size: clamp(2rem, 10vw, 2.55rem) !important;
        line-height: 1.14;
    }

    .pp-hero .d-flex.flex-wrap {
        display: grid !important;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .pp-hero .btn {
        width: 100%;
    }

    .section-header {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .pp-card-img {
        height: clamp(190px, 58vw, 270px) !important;
    }

    .btn {
        padding: 0.6rem 1.1rem;
        font-size: 0.92rem;
    }

    .sticky-top {
        position: static !important;
    }

    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .mb-5 {
        margin-bottom: 2rem !important;
    }

    .gt_float_wrapper {
        right: 14px !important;
        bottom: 14px !important;
        max-width: calc(100vw - 28px);
    }
}

/* Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023.98px) {
    :root {
        --container-pad: 1.5rem;
    }

    main.container,
    .navbar > .container {
        width: min(100% - 3rem, 960px);
    }

    .pp-hero {
        min-height: 420px;
        padding: 3rem !important;
    }

    .pp-card-img {
        height: 220px !important;
    }

    .sticky-top {
        position: static !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 0.75rem;
        padding: 0.75rem;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: var(--radius-lg);
        background: rgba(7, 17, 31, 0.96);
    }
}

/* Desktop: 1024px and above */
@media (min-width: 1024px) {
    main.container,
    .navbar > .container {
        width: min(100% - 4rem, 1200px);
    }

    .navbar-expand-lg .navbar-collapse {
        min-width: 0;
    }

    .navbar-expand-lg .navbar-nav {
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
