/* Shared site stylesheet generated from existing inline styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    padding-top: 65px;
}

/* Header / nav styles (shared markup uses these classes) */
.top-header {
    background: white;
    border-bottom: 2px solid #f0e68c;
    padding: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    left: 0
}

.top-header.admin-header {
    background: white;
    border-bottom: 2px solid #f0e68c
}

.top-header.admin-header .logo-text h1 {
    color: #000
}

.top-header.admin-header .logo-text p {
    color: #333
}

.top-header.admin-header .top-nav a {
    color: #000
}

.top-header.admin-header .top-nav a:hover {
    color: #333
}

.top-header.admin-header .page-title {
    color: #333
}

.top-header.admin-header .login-btn,
.top-header.admin-header .logout-btn {
    color: #000
}

.top-header.admin-header .login-btn:hover,
.top-header.admin-header .logout-btn:hover {
    color: #333
}

.top-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative
}

.header-left-actions {
    display: flex;
    align-items: center;
    gap: 1rem
}

.header-settings-btn {
    padding: 0.5rem 1rem;
    background: #f0e68c;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer
}

.header-settings-btn:hover {
    background: #f0e68c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2)
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem
}

.logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f0e68c 0%, #d4af37 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.logo-text h1 {
    color: #f0e68c;
    font-size: 1rem;
    margin: 0
}

.logo-text p {
    color: #666;
    font-size: 0.75rem;
    margin: 0
}

/* Nav + right controls */
.top-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center
}

.top-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color .2s
}

.top-nav a:hover {
    color: #f0e68c
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: flex-end;
    flex: 1
}

.page-title {
    color: #666;
    font-weight: 700;
    margin-right: auto;
    font-size: 0.98rem;
    white-space: nowrap
}

.top-header:not(.admin-header) .page-title {
    font-size: 1.5rem;
    color: #f0e68c;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    transform: translate(-50%, -50%)
}

.auth-actions {
    display: flex;
    align-items: center
}

.login-btn {
    background: none;
    border: 0;
    color: #f0e68c;
    font-weight: 700;
    cursor: pointer;
    padding: .25rem .5rem;
    white-space: nowrap
}

.logout-btn {
    background: none;
    border: 0;
    color: #f0e68c;
    font-weight: 700;
    cursor: pointer;
    padding: .25rem .5rem;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s
}

.logout-btn:hover {
    color: #f0e68c
}

.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid #f0e68c;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    border-radius: 4px;
    z-index: 1001
}

.top-header.admin-header .dropdown-content {
    border: 1px solid #f0e68c
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background 0.2s
}

.dropdown-content a:last-child {
    border-bottom: none
}

.dropdown-content a:hover {
    background: #f9f9f9;
    color: #f0e68c
}

.nav-dropdown:hover .dropdown-content {
    display: block
}

/* Hero that extends behind the welcome section */
.hero {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    z-index: 1
}

.hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 1.5rem
}

.hero .hero-content h1 {
    font-size: 2rem;
    margin-bottom: .5rem
}

/* Pull the welcome section up so the hero background continues behind it */
.welcome-section {
    padding: 2rem 0;
    text-align: center;
    margin-top: -20px;
    position: relative;
    z-index: 3
}

.welcome-section h2 {
    color: #f0e68c;
    font-size: 2rem
}

.welcome-section p {
    color: #666;
    max-width: 800px;
    margin: 1rem auto;
    line-height: 1.7
}

/* Index features */
.features-section {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    margin: 2.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06)
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem
}

.feature-item h4 {
    color: #f0e68c
}

/* Services/contact cards */
.service-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    border-left: 6px solid #f0e68c
}

.contact-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06)
}

/* Layout container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    flex: 1 0 auto;
    margin-top: 0
}

footer {
    background: #f0e68c;
    color: white;
    padding: .8rem 1rem;
    text-align: center;
    margin-top: 0
}

body.resident-page footer {
    color: #f0e68c
}

@media (max-width:720px) {
    .hero {
        height: 320px
    }

    .welcome-section {
        margin-top: -80px
    }

    .logo {
        width: 56px;
        height: 56px
    }
}

/* Gold gradient hero variant used on index and residents */
.hero.hero-gold {
    background: none;
    color: white
}

.hero.hero-gold::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(240, 230, 140, 0.75), rgba(212, 175, 55, 0.65));
    z-index: 1
}

.hero.hero-gold .hero-content {
    z-index: 2
}

.hero.hero-gold h1 {
    color: white
}

.hero.hero-gold p {
    color: white
}

/* Two-column layout for services + contact */
.two-col {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start
}

.two-col main {
    min-width: 0
}

.two-col aside {
    width: 100%
}

/* Admin Layout */
.admin-layout {
    display: flex;
    gap: 0;
    flex: 1 0 auto
}

.admin-layout .admin-sidebar {
    background: white;
    border-right: 2px solid #f0e68c;
    width: 250px;
    padding: 2rem 0;
    flex-shrink: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto
}

.admin-layout .main-content {
    flex: 1;
    padding: 2rem
}

/* New Admin Wrapper (with sidebar like resident portal) */
.resident-wrapper {
    display: flex;
    flex: 1 0 auto;
    width: 100%;
    margin-top: 0
}

.admin-wrapper {
    display: flex;
    flex: 1 0 auto;
    width: 100%;
    margin-top: 0
}

.admin-sidebar {
    width: 220px;
    background: linear-gradient(135deg, #f0e68c 0%, #d4af37 100%);
    color: white;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    transition: width 0.3s ease;
    align-self: flex-start;
    flex-shrink: 0;
}

.admin-sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

.admin-main-wrapper {
    flex: 1;
    transition: none;
}

.admin-main-wrapper.expanded {
    margin-left: 0;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    background: none;
    border: none;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    display: none;
}

.admin-header .sidebar-toggle {
    display: block;
}

/* Admin Sidebar Styles */
.admin-nav-section {
    margin-bottom: 2rem;
    padding: 0 1.5rem
}

.admin-nav-section h3 {
    color: #f0e68c;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin: 0 0 1rem 0;
    font-weight: 700;
    letter-spacing: 0.5px
}

.admin-nav-section ul {
    list-style: none;
    margin: 0;
    padding: 0
}

.admin-nav-section li {
    margin: 0.5rem 0
}

.admin-nav-section a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s
}

.admin-nav-section a:hover {
    background: #f0f0f0;
    color: #f0e68c;
    padding-left: 1.25rem
}

.admin-nav-section a.active {
    background: #e8e8e8;
    color: #f0e68c;
    font-weight: 600
}

/* Resident Pages Main Wrapper */
.main-content-wrapper {
    padding: 2rem;
    flex: 1 0 auto;
    margin-left: 220px;
    transition: margin-left 0.3s ease;
}

.main-content-wrapper.expanded {
    margin-left: 0;
}

/* Footer Styles */
footer {
    flex-shrink: 0;
    width: 100%;
    margin-left: 0;
    transition: none;
}

.resident-sidebar {
    transition: transform 0.3s ease;
}

.resident-sidebar.collapsed {
    transform: translateX(-100%);
}

@media (max-width:900px) {
    .two-col {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        flex-direction: column
    }

    .admin-layout .admin-sidebar {
        width: 100%;
        max-height: auto;
        border-right: none;
        border-bottom: 2px solid #f0e68c;
        padding: 1rem 0
    }

    .admin-nav-section {
        padding: 0 1rem
    }

    .admin-wrapper {
        flex-direction: column
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }

    .admin-main-wrapper {
        margin-left: 0
    }

    .main-content-wrapper {
        margin-left: 0
    }

    footer {
        width: 100%;
        margin-left: 0
    }
}