/*
Theme Name: CampusSetup
Theme URI: https://campussetup.local
Author: CampusSetup
Description: A clean, student-focused study space and hostel organization theme.
Version: 1.0
Text Domain: campussetup
*/

/* =========================================================
   CAMPUSSETUP — DESIGN SYSTEM
   ========================================================= */

:root {
    --bg: #f7f7f5;
    --surface: #ffffff;
    --text: #171717;
    --muted: #666666;
    --border: #e7e7e3;
    --accent: #111111;

    --max-width: 1180px;
    --content-width: 1000px;

    --radius: 20px;
    --card-radius: 16px;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        "Segoe UI",
        sans-serif;

    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}


/* =========================================================
   GLOBAL CONTAINER
   ========================================================= */

.container {
    width: min(100% - 40px, var(--max-width));
    margin-inline: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    padding: 14px 0;

    background: rgba(247, 247, 245, 0.88);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(231, 231, 227, 0.8);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
}

.site-brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-navigation a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;

    transition: color 0.2s ease;
}

.main-navigation a:hover {
    color: var(--text);
}

.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 16px;

    border-radius: 999px;

    background: var(--accent);
    color: #ffffff !important;

    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    padding: 110px 0 90px;
}

.hero-content {
    max-width: 780px;
}

.eyebrow {
    display: inline-block;

    margin-bottom: 18px;

    color: var(--muted);

    font-size: 13px;
    font-weight: 600;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;

    max-width: 800px;

    font-size: clamp(48px, 7vw, 82px);
    line-height: 0.98;

    letter-spacing: -0.065em;
}

.hero p {
    max-width: 650px;

    margin: 28px 0 0;

    color: var(--muted);

    font-size: 19px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: 0 20px;

    border-radius: 999px;

    font-size: 14px;
    font-weight: 600;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--accent);
    color: #ffffff;
}

.button-secondary {
    background: var(--surface);
    border: 1px solid var(--border);
}


/* =========================================================
   GENERAL SECTIONS
   ========================================================= */

.section {
    padding: 90px 0;
}

.section-heading {
    max-width: 650px;
    margin-bottom: 40px;
}

.section-heading h2 {
    margin: 0;

    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.05;

    letter-spacing: -0.05em;
}

.section-heading p {
    margin-top: 16px;
    color: var(--muted);
}


/* =========================================================
   CARDS
   ========================================================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.card {
    padding: 28px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.08);
}

.card h3 {
    margin: 0;

    font-size: 21px;
    letter-spacing: -0.025em;
}

.card p {
    margin: 12px 0 0;

    color: var(--muted);

    font-size: 15px;
}


/* =========================================================
   ARTICLE / GUIDE PAGE
   ========================================================= */

.content-page {
    padding: 90px 0 110px;
}


/* =========================================================
   GUIDE PAGE HEADER
   ========================================================= */

.page-header {
    max-width: 850px;

    margin: 0 auto 70px;

    text-align: center;
}

.page-header .eyebrow {
    margin-bottom: 18px;
}

.page-header h1 {
    margin: 0;

    font-size: clamp(42px, 6vw, 72px);

    line-height: 1.02;

    letter-spacing: -0.06em;
}


/* =========================================================
   GUIDE CONTENT
   ========================================================= */

/*
   IMPORTANT:
   The guide content used to be limited to 760px.
   That made the article look squeezed into a narrow
   central column on large screens.

   We now use a wider 1000px content area while keeping
   paragraphs at a comfortable reading width.
*/

/* =========================================================
   GUIDE CONTENT — FULL WIDTH FIX
   ========================================================= */

.page-content {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.page-content p {
    width: 100% !important;
    max-width: 1100px !important;

    margin: 0 0 28px;

    color: #444444;

    font-size: 18px;
    line-height: 1.75;
}

/* =========================================================
   WORDPRESS / GUTENBERG WIDTH OVERRIDE
   ========================================================= */

.page-content>*,
.page-content .wp-block-group,
.page-content .wp-block-column,
.page-content .wp-block-paragraph {
    max-width: 1100px !important;
}

.page-content .wp-block-paragraph {
    width: 100% !important;
}

/* =========================================================
   GUIDE HEADINGS
   ========================================================= */

.page-content h2 {
    width: 100%;
    max-width: 1000px;

    margin: 72px 0 22px;

    font-size: clamp(32px, 4vw, 44px);

    line-height: 1.1;

    letter-spacing: -0.045em;
}

.page-content h3 {
    width: 100%;
    max-width: 1000px;

    margin: 42px 0 16px;

    font-size: 23px;

    line-height: 1.25;

    letter-spacing: -0.025em;
}


/* =========================================================
   LINKS
   ========================================================= */

.page-content a {
    color: #111111;

    text-decoration: underline;

    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.page-content a:hover {
    opacity: 0.65;
}


/* =========================================================
   LISTS
   ========================================================= */

.page-content ul,
.page-content ol {
    max-width: 900px;

    margin: 0 0 28px;

    padding-left: 24px;
}

.page-content li {
    margin-bottom: 10px;

    color: #444444;

    font-size: 17px;
    line-height: 1.7;
}


/* =========================================================
   BLOCKQUOTES
   ========================================================= */

.page-content blockquote {
    max-width: 900px;

    margin: 40px 0;

    padding: 24px 28px;

    background: var(--surface);

    border-left: 3px solid var(--text);

    border-radius: 12px;

    box-shadow: var(--shadow);
}


/* =========================================================
   IMAGES
   ========================================================= */

.page-content img {
    max-width: 100%;

    margin: 40px 0;

    border-radius: 18px;
}


/* =========================================================
   FAQ — CAMPUSSETUP DESIGN SYSTEM
   ========================================================= */

/*
   FAQ structure:

   H2
   H3
   Paragraph

   The paragraph immediately following each FAQ question
   becomes the answer card.
*/

.entry-content h2+h3 {
    margin-top: 38px;
}

.entry-content h3 {
    margin-bottom: 18px;
}


/* FAQ answer card */

.entry-content h3+p {
    width: 100%;
    max-width: none;

    margin: 0 0 38px;

    padding: 28px 30px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-left: 3px solid var(--text);

    border-radius: var(--card-radius);

    box-shadow: var(--shadow);

    color: var(--muted);

    font-size: 18px;
    line-height: 1.75;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    margin-top: 60px;

    padding: 60px 0 30px;

    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;

    justify-content: space-between;

    gap: 40px;
}

.footer-brand {
    font-size: 22px;

    font-weight: 700;

    letter-spacing: -0.04em;
}

.footer-links {
    display: flex;

    gap: 24px;

    color: var(--muted);

    font-size: 14px;
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 800px) {

    .main-navigation {
        display: none;
    }

    .hero {
        padding: 80px 0 60px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-links {
        flex-wrap: wrap;
    }

    .content-page {
        padding: 70px 0 80px;
    }

    .page-header {
        margin-bottom: 55px;

        text-align: left;
    }

    .page-content {
        width: 100%;
        max-width: 100%;
    }

    .page-content p {
        max-width: 100%;

        font-size: 17px;

        line-height: 1.75;
    }

    .page-content h2 {
        max-width: 100%;

        margin-top: 60px;
    }

    .page-content h3 {
        max-width: 100%;
    }

    .page-content ul,
    .page-content ol,
    .page-content blockquote {
        max-width: 100%;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 520px) {

    .container {
        width: min(100% - 28px, var(--max-width));
    }

    .hero {
        padding: 65px 0 50px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero p {
        font-size: 17px;
    }

    .section {
        padding: 65px 0;
    }

    .content-page {
        padding: 55px 0 65px;
    }

    .page-header {
        margin-bottom: 45px;
    }

    .page-header h1 {
        font-size: 42px;
    }

    .page-content {
        width: 100%;
        max-width: 100%;
    }

    .page-content p {
        max-width: 100%;

        font-size: 17px;
        line-height: 1.7;
    }

    .page-content h2 {
        margin-top: 52px;

        font-size: 30px;
    }

    .page-content h3 {
        font-size: 21px;
    }

    .entry-content h3+p {
        padding: 22px;

        font-size: 17px;

        line-height: 1.7;
    }
}

/* ================================
   PRIMARY NAVIGATION
   ================================ */

.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: opacity 0.2s ease;
}

.main-navigation a:hover {
    opacity: 0.6;
}

/* Dropdown indicator */
.main-navigation .menu-item-has-children>a::after {
    content: "⌄";
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    transform: translateY(-1px);
}

/* Dropdown menu */
.main-navigation .sub-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);

    display: block;
    min-width: 210px;

    padding: 10px;
    margin: 0;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}

/* Invisible hover bridge between parent menu item and dropdown */
.main-navigation .sub-menu::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.main-navigation .sub-menu li {
    width: 100%;
}

.main-navigation .sub-menu a {
    padding: 10px 12px;
    border-radius: 9px;
    white-space: nowrap;
}

.main-navigation .sub-menu a:hover {
    background: var(--bg);
    opacity: 1;
}

/* Show dropdown on hover */
.main-navigation .menu-item-has-children:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Header navigation spacing */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-brand {
    flex-shrink: 0;
}

.main-navigation {
    margin-left: auto;
    margin-right: 28px;
}

.header-cta {
    flex-shrink: 0;
}


/* ================================
   MOBILE NAVIGATION
   ================================ */

@media (max-width: 900px) {

    .main-navigation ul {
        gap: 16px;
    }

    .main-navigation a {
        font-size: 13px;
    }

    .main-navigation {
        margin-right: 16px;
    }

    .header-cta {
        display: none;
    }
}


@media (max-width: 700px) {

    .main-navigation {
        display: none;
    }

}

/* ================================
   FOOTER
   ================================ */

.site-footer {
    margin-top: 80px;
    padding: 56px 0 24px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.footer-brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.footer-brand p {
    max-width: 300px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    white-space: nowrap;
    max-width: none;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.footer-links a:hover {
    opacity: 0.6;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}


@media (max-width: 700px) {

    .footer-inner {
        flex-direction: column;
        gap: 28px;
    }

    .footer-links {
        justify-content: flex-start;
    }

}