:root {

    --pg-blue: #336791;
    --pg-dark: #264866;

    --background: #ffffff;
    --light-bg: #dde5ee;

    --text: #222;
    --muted: #475569;

    --border: #d6dbe1;

    --card: #ffffff;

}

body.dark {

    --background: #111827;
    --light-bg: #1f2937;

    --text: #f1f5f9;
    --muted: #cbd5e1;

    --border: #334155;

    --card: #1e293b;

}

* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

body {

    font-family: Arial, Helvetica, sans-serif;

    background: var(--background);

    color: var(--text);

    line-height: 1.6;

    transition: 0.3s;

}
section {

    padding: 90px 0;

}

/* CONTAINER */

.container {

    width: 90%;
    max-width: 1250px;

    margin: auto;

}

/* TOPBAR */

.topbar {

    background: linear-gradient(to bottom,
            #336791,
            #264866);

    color: white;

    padding: 22px 0;

    border-bottom: 1px solid rgba(255,255,255,0.15);

}

.topbar-content {

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 30px;

}

.brand {

    display: flex;
    align-items: center;
    gap: 20px;

}
.brand div {

    display: flex;
    flex-direction: column;
    justify-content: center;

}

.brand img {

    width: 48px;
    height: 48px;

    object-fit: contain;

}

.brand h1 {

    font-size: 30px;
    font-weight: normal;

}

.brand p {

    font-size: 14px;
    color: rgba(255,255,255,0.85);

}

/* NAVIGATION */

.navbar {

    background: white;

    border-bottom: 1px solid var(--border);

    position: sticky;
    top: 0;

    z-index: 1000;

    box-shadow:
        0 1px 2px rgba(0,0,0,0.04);

}
body.dark .navbar {

    background: #0f172a;

}
body.dark .navbar a {

    color: #e2e8f0;

}

body.dark .navbar a:hover {

    background: #336791;

    color: white;

}

.navbar ul {

    list-style: none;

    display: flex;

}

.navbar li {

    border-right: 1px solid var(--border);

}

.navbar a {

    display: block;

    padding: 16px 24px;

    text-decoration: none;

    color: var(--text);

    font-size: 14px;

    font-weight: 600;

    letter-spacing: 0.2px;

    transition: 0.2s;

}

.navbar a:hover {

    background: var(--pg-blue);

    color: white;

}

/* HERO */

.hero {

    padding: 80px 0;

    background:
        linear-gradient(rgba(255,255,255,0.92),
            rgba(255,255,255,0.92)),
        url('https://www.postgresql.org/media/img/about/press/elephant.png');

    background-repeat: no-repeat;

    background-position: right center;

    background-size: 400px;

    border-bottom: 1px solid var(--border);

}

body.dark .hero {

    background:
        linear-gradient(rgba(17,24,39,0.94),
            rgba(17,24,39,0.94)),
        url('https://www.postgresql.org/media/img/about/press/elephant.png');

    background-repeat: no-repeat;

    background-position: right center;

    background-size: 400px;

}

.hero h2 {

    font-size: 52px;

    line-height: 1.15;

    font-weight: 500;

    max-width: 900px;

    margin-bottom: 24px;

    color: var(--pg-dark);

}

body.dark .hero h2 {

    color: #93c5fd;

}

.hero p {

    max-width: 760px;

    color: var(--muted);

    margin-bottom: 38px;

    font-size: 18px;

    line-height: 1.8;

}
body.dark .hero p {

    color: #cbd5e1;

}

/* BUTTONS */

.hero-buttons {

    display: flex;
    gap: 18px;

}

.btn-primary,
.btn-secondary,
.theme-toggle {

    padding: 12px 22px;

    border-radius: 4px;

    border: 1px solid var(--pg-dark);

    cursor: pointer;

    text-decoration: none;

    font-size: 14px;

}

.btn-primary {

    background: var(--pg-blue);

    color: white;

}

.btn-primary:hover {

    background: var(--pg-dark);

}

.btn-secondary {

    background: transparent;

    color: var(--pg-dark);

}

.btn-secondary:hover {

    background: var(--pg-dark);

    color: white;

}

/* THEME TOGGLE */
/* ADVANCED THEME SWITCH */

.theme-switch-wrapper {

    display: flex;
    align-items: center;

}

.theme-switch {

    position: relative;

    display: inline-block;

    width: 68px;
    height: 34px;

}

.theme-switch input {

    opacity: 0;
    width: 0;
    height: 0;

}

.slider {

    position: absolute;

    cursor: pointer;

    inset: 0;

    background:
        linear-gradient(to right,
            #dbeafe,
            #93c5fd);

    border-radius: 50px;

    transition: 0.4s ease;

    border:
        1px solid rgba(255,255,255,0.2);

    overflow: hidden;

}

.slider::before {

    content: "";

    position: absolute;

    height: 26px;
    width: 26px;

    left: 4px;
    top: 3px;

    background: white;

    border-radius: 50%;

    transition: 0.4s ease;

    box-shadow:
        0 2px 8px rgba(0,0,0,0.2);

}

.slider-icon {

    position: absolute;

    left: 9px;
    top: 7px;

    font-size: 14px;

    transition: 0.4s ease;

}

/* DARK MODE ACTIVE */

input:checked + .slider {

    background:
        linear-gradient(to right,
            #0f172a,
            #1e293b);

}

input:checked + .slider::before {

    transform: translateX(33px);

}

input:checked + .slider .slider-icon {

    transform: translateX(33px);

    content: "🌙";

}

/* HOVER */

.theme-switch:hover .slider {

    box-shadow:
        0 0 12px rgba(255,255,255,0.15);

}


.theme-toggle:hover {

    background: rgba(255,255,255,0.18);

    border-color: rgba(255,255,255,0.35);

}

body.dark .theme-toggle {

    background: rgba(15,23,42,0.9);

    border: 1px solid rgba(255,255,255,0.08);

}

/* SECTIONS */

.light-section {

    background: var(--light-bg);

}

.section-title {

    font-size: 34px;

    margin-bottom: 40px;

    color: var(--pg-dark);

}
body.dark .section-title {

    color: #e2e8f0;

}

/* GRID */

.grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(320px, 1fr));

    gap: 25px;

}

/* CARD */
.card {

    background: var(--card);

    border: 1px solid var(--border);

    padding: 34px;

    border-radius: 10px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;

    box-shadow:
        0 4px 10px rgba(0,0,0,0.04);

}

body.dark .card {

    background:
        linear-gradient(
            to bottom,
            #1e293b,
            #172033
        );

    box-shadow:
        0 6px 20px rgba(0,0,0,0.35);

}

.card:hover {

    border-color: var(--pg-blue);

    transform: translateY(-3px);

    box-shadow:
        0 10px 24px rgba(0,0,0,0.06);

}

.card h3 {

    margin-bottom: 14px;

    color: var(--pg-blue);

    font-size: 22px;

}
body.dark .card h3 {

    color: #93c5fd;

}

.card p {

    color: var(--muted);

    line-height: 1.8;

    font-size: 15px;

}

body.dark .card p {

    color: #cbd5e1;

}

/* CONTACT */

/* ENTERPRISE CONTACT */

.enterprise-contact {

    background:
        linear-gradient(to right,
            #336791,
            #264866);

    color: white;

    padding: 80px 0;

}

.enterprise-contact-content {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 50px;

    flex-wrap: wrap;

}

.enterprise-contact h2 {

    font-size: 40px;

    margin-bottom: 18px;

}

.enterprise-contact p {

    max-width: 700px;

    line-height: 1.8;

    color: rgba(255,255,255,0.9);

}

.contact-action {

    display: flex;

    flex-direction: column;

    gap: 12px;

}

.contact-action a {

    background: white;

    color: #264866;

    padding: 16px 26px;

    text-decoration: none;

    font-weight: bold;

    border-radius: 4px;

    text-align: center;

    transition: 0.2s;

}

.contact-action a:hover {

    transform: translateY(-2px);

}

.contact-action span {

    font-size: 15px;

    opacity: 0.9;

}
/* DOCUMENT BUTTON */

.doc-button {

    display: inline-block;

    margin-top: 20px;

    background: var(--pg-blue);

    color: white;

    padding: 12px 20px;

    border-radius: 4px;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    transition: 0.2s ease;

}

.doc-button:hover {

    background: var(--pg-dark);

}
/* DOCUMENTATION CODE BLOCK */

pre {

    background: #0f172a;

    color: #f8fafc;

    padding: 18px;

    border-radius: 6px;

    overflow-x: auto;

    margin: 20px 0;

    font-size: 14px;

    line-height: 1.7;

}

/* FOOTER */

.footer-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(240px, 1fr));

    gap: 40px;

}

footer h3,
footer h4 {

    margin-bottom: 14px;

}

footer ul {

    list-style: none;

}

footer {

    background: #0f172a;

    color: white;

    padding: 60px 0;

}

footer li {

    margin-bottom: 8px;

    color: rgba(255,255,255,0.82);

}

footer p {

    color: rgba(255,255,255,0.82);

    line-height: 1.7;

}

/* RESPONSIVE */

@media(max-width: 900px) {

    .topbar-content {

        flex-direction: column;
        gap: 20px;

    }

    .navbar ul {

        flex-wrap: wrap;

    }

    .hero {

        background-size: 220px;

    }

    .hero h2 {

        font-size: 30px;

    }

}

