/* ============================================================
   Bernado's Portfolio — Blush & Bloom Feminine Design
   ============================================================ */

/* 1 — Design Tokens */
:root {
    --bg:            #fff5fb;
    --card-bg:       #ffffff;
    --nav-bg:        #4a0e4e;
    --nav-border:    rgba(236, 72, 153, 0.18);
    --nav-hover:     rgba(255, 255, 255, 0.09);
    --accent:        #e91e8c;
    --accent-hover:  #c2185b;
    --accent-light:  #fce7f3;
    --accent-glow:   rgba(233, 30, 140, 0.28);
    --accent2:       #9c27b0;
    --text:          #2d0a38;
    --text-muted:    #7c3d7e;
    --border:        #f3d6f0;
    --shadow-sm:     0 1px 3px rgba(74, 14, 78, 0.08), 0 1px 2px rgba(74, 14, 78, 0.05);
    --shadow:        0 4px 20px rgba(74, 14, 78, 0.13);
    --shadow-lg:     0 10px 40px rgba(74, 14, 78, 0.18);
    --success-bg:    #fce7f3;
    --success-text:  #9d174d;
    --error-bg:      #fee2e2;
    --error-text:    #991b1b;
    --code-bg:       #1e0a2a;
    --radius:        14px;
    --radius-sm:     9px;
}

/* 2 — Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-x: hidden; }

body {
    font-family: 'Nunito', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
}

/* 3 — Topnav */
.topnav {
    background: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 20px rgba(74, 14, 78, 0.5);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 20px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #e91e8c, #f06292);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(233, 30, 140, 0.45);
    line-height: 1;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.93rem;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.01em;
}

.brand-sub {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.67rem;
    font-weight: 500;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.nav-link {
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 20px;
    transition: background 0.18s, color 0.18s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Nunito', inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-link.active {
    background: rgba(233, 30, 140, 0.22);
    color: #f8a8cc;
    font-weight: 700;
}

/* Activities toggle button */
.activities-btn .btn-arrow {
    transition: transform 0.22s ease;
    opacity: 0.6;
    flex-shrink: 0;
}

.activities-btn.open {
    background: rgba(233, 30, 140, 0.22);
    color: #f8a8cc;
}

.activities-btn.open .btn-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

/* Nav Auth */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.auth-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
    padding: 6px 13px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 600;
}

.auth-dot {
    width: 7px;
    height: 7px;
    background: #f06292;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px #f06292;
}

.auth-link {
    color: #f48fb1;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 7px 20px;
    border: 1.5px solid rgba(244, 143, 177, 0.5);
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.auth-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* Mobile toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.mobile-toggle:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* 4 — Activities Panel */
.activities-panel {
    background: #3a0a3e;
    border-top: 1px solid rgba(233, 30, 140, 0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(74, 14, 78, 0.35);
}

.activities-panel.open {
    max-height: 440px;
    border-bottom: 1px solid rgba(233, 30, 140, 0.12);
}

.activities-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 28px 22px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.activity-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.activity-link:hover {
    background: rgba(233, 30, 140, 0.12);
    color: #f8a8cc;
    border-color: rgba(233, 30, 140, 0.2);
}

.activity-link.active {
    background: rgba(233, 30, 140, 0.18);
    color: #f48fb1;
    border-color: rgba(233, 30, 140, 0.3);
    font-weight: 700;
}

.activity-num {
    min-width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.activity-link:hover .activity-num,
.activity-link.active .activity-num {
    background: var(--accent-glow);
    color: #f48fb1;
}

/* 5 — Hero Banner (index page — full-width breakout from .container) */
.hero-banner {
    /* break out of the centered container to full viewport width */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: -32px; /* cancel container top margin so hero sits flush */
    margin-bottom: 32px;
    background: linear-gradient(135deg, #4a0e4e 0%, #880e4f 50%, #c2185b 100%);
    padding: 64px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 60%, rgba(255, 182, 215, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 25%, rgba(255, 255, 255, 0.06) 0%, transparent 55%);
    pointer-events: none;
}

.hero-content { position: relative; }

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    font-family: 'Playfair Display', serif;
}

.hero-accent {
    background: linear-gradient(90deg, #f8a8cc, #fbbde6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.hero-btn {
    font-size: 0.95rem;
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    box-shadow: none;
    border-radius: 25px;
}

.hero-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(233, 30, 140, 0.45);
    color: #ffffff;
    transform: translateY(-2px);
}

/* 6 — Page Hero (activity pages) */
.page-hero {
    background: linear-gradient(135deg, #4a0e4e 0%, #880e4f 55%, #c2185b 100%);
    padding: 48px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 60%, rgba(255, 182, 215, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 30%, rgba(255, 255, 255, 0.06) 0%, transparent 55%);
    pointer-events: none;
}

.page-hero h1 {
    position: relative;
    font-size: clamp(1.7rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.accent-text {
    background: linear-gradient(90deg, #f8a8cc, #f48fb1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero p {
    position: relative;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    font-weight: 500;
}

/* 7 — Layout */
.container {
    width: 92%;
    max-width: 1100px;
    margin: 32px auto;
    flex: 1;
}

/* 8 — Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 28px 32px;
    margin-bottom: 24px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--accent), #f48fb1);
    border-radius: 2px;
    flex-shrink: 0;
}

.card p { color: var(--text-muted); margin-bottom: 10px; }
.card ul, .card ol { padding-left: 22px; color: var(--text-muted); }
.card li { margin-bottom: 5px; }

/* 9 — Demo Area */
.demo-area {
    background: #fff9fc;
    border: 1px dashed #f3b6da;
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin: 16px 0;
}

/* 10 — Buttons */
.source-btn,
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: 'Nunito', inherit;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px var(--accent-glow);
    margin: 4px 4px 4px 0;
}

.source-btn:hover,
.btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 18px rgba(194, 24, 91, 0.4);
    transform: translateY(-1px);
}

.source-btn {
    background: var(--code-bg);
    box-shadow: none;
    color: #c084fc;
}

.source-btn:hover {
    background: #2d1a3e;
    box-shadow: none;
    transform: none;
    color: #d8b4fe;
}

/* 11 — Source Code Block */
.source-code {
    background: var(--code-bg);
    color: #d8b4fe;
    padding: 20px 22px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin-top: 10px;
    font-size: 0.82rem;
    line-height: 1.65;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    border: 1px solid rgba(233, 30, 140, 0.1);
}

/* 12 — Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

thead tr {
    background: linear-gradient(90deg, #4a0e4e, #880e4f);
    color: #ffffff;
}

thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: 'Nunito', sans-serif;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

tbody tr:hover td { background: var(--accent-light); }

tbody tr:nth-child(even) td {
    background: rgba(233, 30, 140, 0.025);
}

tbody td {
    padding: 11px 16px;
    color: var(--text-muted);
    border: none;
}

/* 13 — Forms */
input,
select,
textarea {
    width: 100%;
    padding: 11px 15px;
    margin-top: 5px;
    margin-bottom: 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'Nunito', inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: #fff8fc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
    background: #ffffff;
}

label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* 14 — Alerts */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-left: 4px solid transparent;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-left-color: var(--accent);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-left-color: #ef4444;
}

/* 15 — Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.gallery-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: var(--shadow-sm);
}

.gallery-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

/* 16 — Footer */
.footer {
    background: linear-gradient(135deg, #3a0a3e, #5c1245);
    color: rgba(255, 255, 255, 0.38);
    text-align: center;
    padding: 28px;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    margin-top: auto;
    border-top: 1px solid rgba(233, 30, 140, 0.12);
}

.footer p { margin: 0; line-height: 1.8; }
.footer a { color: #f48fb1; text-decoration: none; }
.footer a:hover { color: #f8a8cc; }
.footer-heart { color: #e91e8c; }
.footer-highlight { color: rgba(255, 255, 255, 0.6); font-weight: 600; }

/* 17 — Responsive */
@media (max-width: 900px) {
    .activities-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .nav-inner { padding: 0 18px; }
    .brand-sub { display: none; }

    .nav-links {
        display: none;
        position: absolute;
        top: 69px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 10px 16px 14px;
        gap: 2px;
        border-bottom: 1px solid var(--nav-border);
        box-shadow: 0 8px 24px rgba(74, 14, 78, 0.5);
        z-index: 190;
    }

    .nav-links.mobile-open { display: flex; }

    .nav-link {
        justify-content: flex-start;
        padding: 10px 14px;
        border-radius: var(--radius-sm);
    }

    .nav-auth { display: none; }
    .mobile-toggle { display: flex; }

    .activities-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 14px 18px 18px;
    }

    .hero-banner { padding: 48px 20px; }
    .page-hero { padding: 36px 20px; }
    .container { width: 95%; margin: 22px auto; }
    .card { padding: 20px 18px; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .activities-grid { grid-template-columns: 1fr; }
    .brand-text { display: none; }
    .brand-logo { width: 36px; height: 36px; font-size: 1.1rem; border-radius: 10px; }
    .hero-title { font-size: 1.8rem; }
}
