/* ============================================================
   Almedina — Digital Services for Holiday Property Owners
   Colours: #538faa (blue), #a8d4e6 (accent), #222 (dark), #f7f9fb (light bg)
   ============================================================ */

/* --- Self-hosted Inter Variable Font --- */
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/Inter-Variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #538faa; text-decoration: none; transition: color .2s; }
a:hover { color: #3b6f8a; }
address { font-style: normal; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all .25s ease;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1.2;
}

.btn-primary {
    background: #538faa;
    color: #fff;
    border-color: #538faa;
}
.btn-primary:hover {
    background: #3b6f8a;
    border-color: #3b6f8a;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #538faa;
    border-color: #538faa;
}
.btn-outline:hover {
    background: #538faa;
    color: #fff;
}

.btn-block { display: block; width: 100%; }
.btn-lg { padding: 18px 40px; font-size: 17px; }
.btn-sm { padding: 10px 20px; font-size: 14px; }

.btn-danger {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}
.btn-danger:hover {
    background: #b02a37;
    border-color: #b02a37;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}
.btn-secondary:hover {
    background: #565e64;
    border-color: #565e64;
    color: #fff;
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #eee;
    transition: box-shadow .3s;
}

.site-header.is-scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-top: 7px;
    margin-bottom: 7px;
}

.header-logo img {
    width: 180px;
    height: auto;
    display: block;
}

.main-nav {
    flex-shrink: 0;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-nav a {
    display: flex;
    align-items: center;
    padding: 12px 12px;
    min-height: 50px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
    color: #444;
    border-radius: 6px;
    transition: color .2s, background .2s;
}
.main-nav a:hover,
.main-nav a.active {
    color: #538faa;
    background: #f0f6fa;
}

.nav-separator {
    display: flex;
    align-items: center;
    padding-left: 16px;
    margin-left: 8px;
    border-left: 1px solid #ddd;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 12px;
    min-height: 50px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
    color: #444;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: color .2s, background .2s;
    white-space: nowrap;
}
.nav-dropdown-toggle:hover {
    color: #538faa;
    background: #f0f6fa;
}

.nav-dropdown-chevron {
    transition: transform .2s;
    flex-shrink: 0;
    color: currentColor;
}

.nav-dropdown.is-open .nav-dropdown-chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: flex;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 6px;
    z-index: 999;
    list-style: none;
    transition: opacity .15s ease, visibility .15s ease;
}

.nav-dropdown.is-open .nav-dropdown-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.nav-dropdown-menu li {
    display: block;
    width: 100%;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 12px;
    min-height: 50px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
    color: #444;
    border-radius: 6px;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover {
    color: #538faa;
    background: #f0f6fa;
}

.nav-cta {
    background: #538faa !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
}
.nav-cta:hover {
    background: #3b6f8a !important;
}

.nav-login {
    font-weight: 500;
    color: #538faa;
    padding: 10px 16px;
}

/* User menu in nav */
.nav-user-menu {
    position: relative;
}

.nav-user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #538faa;
    background: #f0f6fa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
}
.nav-user-toggle:hover {
    background: #e0eef5;
}

.nav-user-toggle svg {
    flex-shrink: 0;
}

.nav-user-menu .nav-dropdown-menu {
    right: 0;
    left: auto;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.nav-toggle-bar {
    display: block;
    width: 26px;
    height: 2.5px;
    background: #333;
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
    position: relative;
    padding: 60px 0 60px;
    overflow: hidden;
    min-height: 360px;
    max-height: 360px;
}

.hero--tall {
    padding: 140px 0 120px;
    min-height: unset;
    max-height: unset;
}

.hero--gradient {
    background: linear-gradient(135deg, #e8ecf0 0%, #dce4eb 100%);
}

.hero--image {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                url('/assets/images/hero.webp') center center / cover no-repeat;
}
.hero--image .hero-content h1,
.hero--image .hero-subtitle {
    color: #fff;
}
.hero--image .hero-highlight {
    color: #a8d4e6;
}
.hero--image .btn-outline {
    border-color: #fff;
    color: #fff;
}
.hero--image .btn-outline:hover {
    background: #fff;
    color: #538faa;
}

.hero--email {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                url('/assets/images/hero-email.png') center center / cover no-repeat;
}

.hero--hosting {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                url('/assets/images/hero-hosting.png') center center / cover no-repeat;
}

.hero--domains {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                url('/assets/images/hero-domains.png') center center / cover no-repeat;
}

.hero--bookkeeping {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                url('/assets/images/hero-bookkeeping.png') center center / cover no-repeat;
}

.hero--mapwidget {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                url('/assets/images/hero-mapwidget.png') center center / cover no-repeat;
}

.hero--website-templates {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                url('/assets/images/hero-website-templates.png') center center / cover no-repeat;
}

.hero--website-bespoke {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                url('/assets/images/hero-website-bespoke.png') center center / cover no-repeat;
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    color: #222;
    margin-bottom: 20px;
}

.hero-highlight {
    color: #538faa;
}

.hero-subtitle {
    font-size: 18px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-decoration {
    position: absolute;
    bottom: -40px;
    right: 5%;
    font-size: 180px;
    font-weight: 700;
    font-family: 'Inter', monospace;
    color: rgba(83, 143, 170, 0.04);
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

/* --- Section Shared --- */
.section-title {
    font-size: 34px;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-bottom: 12px;
}

.section-intro {
    font-size: 17px;
    color: #666;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

/* --- Services --- */
.services {
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.services-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

.service-card {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    padding: 36px 32px;
    transition: transform .25s, box-shadow .25s;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.service-card--highlight {
    border-color: #538faa;
    background: linear-gradient(135deg, #f0f6fa 0%, #fff 100%);
}

.service-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f6fa;
    border-radius: 12px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
}

.service-card-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #538faa;
}
.service-card-link:hover {
    color: #3b6f8a;
}

/* --- Why Choose Us --- */
.why-us {
    padding: 80px 0;
    background: #f7f9fb;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.why-us-item {
    position: relative;
    padding-left: 56px;
}

.why-us-number {
    position: absolute;
    left: 0;
    top: -2px;
    font-size: 28px;
    font-weight: 700;
    color: #538faa;
    opacity: 0.25;
}

.why-us-item h3 {
    font-size: 19px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.why-us-item p {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
}

/* --- Pricing --- */
.pricing {
    padding: 80px 0;
}

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

.pricing-card {
    background: #fff;
    border: 2px solid #e8ecf0;
    border-radius: 16px;
    padding: 36px 32px;
    position: relative;
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}

.pricing-card .btn {
    margin-top: auto;
}
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.pricing-card--featured {
    border-color: #538faa;
    box-shadow: 0 8px 30px rgba(83, 143, 170, 0.15);
}
.pricing-card--featured:hover {
    box-shadow: 0 12px 36px rgba(83, 143, 170, 0.2);
}

.pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #538faa;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 18px;
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.pricing-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    margin-bottom: 12px;
}

.price-amount {
    font-size: 48px;
    font-weight: 700;
    color: #222;
    line-height: 1;
}

.price-period {
    font-size: 16px;
    color: #888;
    font-weight: 400;
}

.pricing-features {
    margin-bottom: 28px;
}

.pricing-features li {
    padding: 8px 0 8px 28px;
    font-size: 15px;
    color: #444;
    position: relative;
    line-height: 1.5;
}

.pricing-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 18px;
    height: 18px;
    background: #538faa;
    border-radius: 50%;
    opacity: 0.15;
}

.pricing-features li::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 18px;
    width: 8px;
    height: 5px;
    border-left: 2px solid #538faa;
    border-bottom: 2px solid #538faa;
    transform: rotate(-45deg);
}

.pricing-note {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: #888;
}

.pricing-terms {
    max-width: 1000px;
    margin: 24px auto 0;
    padding: 16px 20px;
    background: #f7f9fb;
    border: 1px solid #e5e9ed;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* --- Features List --- */
.features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 40px 0;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f6fa;
    border-radius: 10px;
    flex-shrink: 0;
}

.feature-item h3 {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* --- Contact --- */
.contact {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

.contact-item a,
.contact-item address {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

/* --- Contact Form --- */
.contact-form-card {
    background: #f7f9fb;
    border-radius: 16px;
    padding: 40px;
    border: 1px solid #e8ecf0;
}

.contact-form-card h3 {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    margin-bottom: 24px;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #538faa;
    box-shadow: 0 0 0 3px rgba(83, 143, 170, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group .field-invalid {
    border-color: #dc3545;
}

label.field-error {
    display: block;
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
}

.form-note {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* --- Flash Messages --- */
.flash {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 14px 20px 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    white-space: nowrap;
    max-width: calc(100vw - 48px);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: opacity 0.4s ease;
}
.flash.flash--hiding {
    opacity: 0;
}
.flash__close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    color: inherit;
    opacity: 0.6;
    flex-shrink: 0;
}
.flash__close:hover {
    opacity: 1;
}

.flash--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash--warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* --- Footer --- */
.site-footer {
    background: #222;
    color: #aaa;
    padding-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}

.footer-brand img {
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 280px;
}

.site-footer h4 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 14px;
    color: #aaa;
    transition: color .2s;
}
.footer-links a:hover {
    color: #538faa;
}

.footer-contact a {
    color: #aaa;
    font-size: 14px;
}
.footer-contact a:hover {
    color: #538faa;
}

.footer-contact address {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 4px;
}

.footer-bottom {
    padding: 20px 0;
}

.footer-bottom p {
    font-size: 13px;
    color: #666;
    text-align: center;
}

/* ============================================================
   Auth Layout
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f7f9fb;
    padding: 40px 24px;
}

.auth-logo {
    margin-bottom: 32px;
}

.auth-logo img {
    width: 200px;
    height: auto;
}

.auth-card {
    margin: 60px auto;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8ecf0;
}

.auth-card h1 {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card .auth-subtitle {
    font-size: 15px;
    color: #666;
    text-align: center;
    margin-bottom: 28px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.auth-links a {
    font-weight: 500;
}

.auth-product-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #538faa;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px 4px 8px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.auth-product-badge svg {
    flex-shrink: 0;
}

/* ============================================================
   Account Layout
   ============================================================ */
.account-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0px;
    min-height: calc(100vh - 200px);
}

.account-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #f7f9fb;
    border-right: 1px solid #e8ecf0;
    padding: 32px 0;
}

.account-sidebar-nav {
    list-style: none;
}

.account-sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #444;
    transition: color .2s, background .2s;
}

.account-sidebar-nav li a:hover {
    color: #538faa;
    background: #eef4f8;
}

.account-sidebar-nav li a.active {
    color: #538faa;
    background: #e0eef5;
    font-weight: 600;
}

.account-sidebar-nav li a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.account-sidebar-nav li a.active svg {
    opacity: 1;
}

/* Sidebar section headings (e.g. "Subscriptions" with sub-items) */
.nav-section {
    margin-top: 8px;
    border-top: 1px solid #e0e6ec;
    padding-top: 8px;
}

.nav-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px 2px;
    font-size: 11px;
    font-weight: 700;
    color: #8899a6;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.nav-section-heading svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.5;
}

.nav-section-items {
    list-style: none;
}

.nav-section-items li a {
    padding-left: 24px;
}

.account-content {
    flex: 1;
    padding: 32px 40px;
    min-width: 0;
}

.account-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    margin-bottom: 24px;
}

.account-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    margin-bottom: 16px;
}

/* --- Account Cards --- */
.account-card {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
}

.account-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin-bottom: 16px;
}

/* --- Tables --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f7f9fb;
    border-bottom: 2px solid #e8ecf0;
}

.data-table td {
    padding: 14px 16px;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #f0f2f5;
}

.data-table tr:hover td {
    background: #fafbfc;
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.badge--active {
    background: #d4edda;
    color: #155724;
}

.badge--pending {
    background: #fff3cd;
    color: #856404;
}

.badge--cancelled {
    background: #f8d7da;
    color: #721c24;
}

.badge--free {
    background: #e2e3e5;
    color: #383d41;
}

/* --- Tier Selection Cards --- */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.tier-card {
    background: #fff;
    border: 2px solid #e8ecf0;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: border-color .2s, box-shadow .2s;
    cursor: pointer;
}

.tier-card:hover {
    border-color: #538faa;
    box-shadow: 0 4px 16px rgba(83, 143, 170, 0.12);
}

.tier-card.selected {
    border-color: #538faa;
    background: #f0f6fa;
}

.tier-card h3 {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.tier-card .tier-price {
    font-size: 36px;
    font-weight: 700;
    color: #538faa;
    margin-bottom: 16px;
}

.tier-card .tier-price span {
    font-size: 16px;
    font-weight: 400;
    color: #888;
}

.tier-card.tier-current {
    border-color: #538faa;
    background: #f0f6fa;
}

.tier-name {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.tier-amount {
    font-size: 36px;
    font-weight: 700;
    color: #538faa;
}

.tier-period {
    font-size: 16px;
    font-weight: 400;
    color: #888;
}

.tier-features {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    text-align: left;
}

.tier-features li {
    padding: 6px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.tier-features li:last-child {
    border-bottom: none;
}

.tier-action {
    margin-top: 16px;
}

.tier-card .btn-text {
    display: inline-block;
    padding: 8px 20px;
    background: #538faa;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.tier-card:hover .btn-text {
    background: #3d6f8f;
}

.tier-card.tier-current .btn-text {
    display: none;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #e8ecf0;
    color: #444;
    transition: all .2s;
}

.pagination a:hover {
    background: #f0f6fa;
    border-color: #538faa;
    color: #538faa;
}

.pagination .active {
    background: #538faa;
    border-color: #538faa;
    color: #fff;
}

/* --- Empty States --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state svg {
    margin: 0 auto 16px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* --- API Key Display --- */
.api-key-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7f9fb;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.api-key-display code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
    color: #333;
    word-break: break-all;
    flex: 1;
}

.api-key-display .btn-sm {
    flex-shrink: 0;
}

/* --- Checkbox List --- */
.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f7f9fb;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color .2s;
}

.checkbox-list label:hover {
    border-color: #538faa;
}

.checkbox-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #538faa;
}

/* --- Template Showcase --- */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin: 48px 0;
}

.template-card {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 16px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.template-preview {
    height: 220px;
    background: linear-gradient(135deg, #e8ecf0, #d5dce3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

.template-info {
    padding: 24px;
}

.template-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.template-info p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* --- Process Steps --- */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    margin: 48px 0;
}

.process-step {
    text-align: center;
    padding: 32px 24px;
}

.step-number {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #538faa;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.process-step h3 {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.process-step p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* --- FAQ Section --- */
.faq {
    padding: 64px 0;
    background: #f7f9fb;
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border: 1px solid #e5e9ed;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color .2s;
}

.faq-item[open] {
    border-color: #538faa;
}

.faq-question {
    padding: 20px 48px 20px 24px;
    font-weight: 600;
    font-size: 16px;
    color: #222;
    cursor: pointer;
    list-style: none;
    position: relative;
    line-height: 1.5;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 300;
    color: #538faa;
    transition: transform .2s;
}

.faq-item[open] .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 0 24px 20px;
    color: #555;
    line-height: 1.7;
    font-size: 15px;
}

.faq-answer p {
    margin: 0;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
    .hero-inner {
        flex-direction: column-reverse;
        text-align: center;
        gap: 32px;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .services-grid--3col {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .account-sidebar {
        width: 220px;
    }

    .nav-section-heading {
        padding: 10px 20px 2px;
    }

    .nav-section-items li a {
        padding-left: 20px;
    }

    .account-content {
        padding: 24px;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .hero--image,
    .hero--email,
    .hero--hosting,
    .hero--domains,
    .hero--bookkeeping,
    .hero--mapwidget,
    .hero--website-templates,
    .hero--website-bespoke {
        background: linear-gradient(135deg, #e8ecf0 0%, #dce4eb 100%);
    }

    .hero--image .hero-content h1,
    .hero--image .hero-subtitle,
    .hero--email .hero-content h1,
    .hero--email .hero-subtitle,
    .hero--hosting .hero-content h1,
    .hero--hosting .hero-subtitle,
    .hero--domains .hero-content h1,
    .hero--domains .hero-subtitle,
    .hero--bookkeeping .hero-content h1,
    .hero--bookkeeping .hero-subtitle,
    .hero--mapwidget .hero-content h1,
    .hero--mapwidget .hero-subtitle,
    .hero--website-templates .hero-content h1,
    .hero--website-templates .hero-subtitle,
    .hero--website-bespoke .hero-content h1,
    .hero--website-bespoke .hero-subtitle {
        color: inherit;
    }

    .hero--image .hero-highlight,
    .hero--email .hero-highlight,
    .hero--hosting .hero-highlight,
    .hero--domains .hero-highlight,
    .hero--bookkeeping .hero-highlight,
    .hero--mapwidget .hero-highlight,
    .hero--website-templates .hero-highlight,
    .hero--website-bespoke .hero-highlight {
        color: #538faa;
    }

    .hero--image .btn-outline,
    .hero--email .btn-outline,
    .hero--hosting .btn-outline,
    .hero--domains .btn-outline,
    .hero--bookkeeping .btn-outline,
    .hero--mapwidget .btn-outline,
    .hero--website-templates .btn-outline,
    .hero--website-bespoke .btn-outline {
        border-color: #538faa;
        color: #538faa;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 14px 0;
    }

    .header-logo img {
        width: 150px;

    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        padding: 100px 32px 40px;
        transform: translateX(100%);
        transition: transform .3s ease;
        z-index: 998;
        overflow-y: auto;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 8px;
    }

    .main-nav a {
        padding: 14px 16px;
        min-height: 59px;
        font-size: 18px;
        line-height: 1.7;
        border-radius: 8px;
    }

    .nav-separator {
        padding-left: 0;
        margin-left: 0;
        border-left: none;
        border-top: 1px solid #eee;
        padding-top: 8px;
        margin-top: 4px;
    }

    .nav-dropdown-toggle {
        width: 100%;
        padding: 14px 16px;
        min-height: 59px;
        font-size: 18px;
        line-height: 1.7;
        justify-content: space-between;
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 0 16px;
        background: transparent;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
        transition: opacity .15s ease, visibility .15s ease, max-height .2s ease;
    }

    .nav-dropdown.is-open .nav-dropdown-menu {
        max-height: 400px;
        visibility: visible;
        opacity: 1;
    }

    .nav-dropdown-menu a {
        font-size: 18px;
        padding: 14px 16px;
        min-height: 59px;
        line-height: 1.7;
    }

    .nav-cta {
        margin-top: 16px;
        padding: 16px !important;
        font-size: 17px !important;
        text-align: center;
    }

    .hero {
        padding: 40px 0 36px;
    }

    .hero-content h1 {
        font-size: 28px;
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 28px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }

    .services, .why-us, .pricing, .contact {
        padding: 56px 0;
    }

    .section-title {
        font-size: 26px;
    }

    .section-intro {
        font-size: 15px;
        margin-bottom: 36px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 28px 24px;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Account: sidebar becomes top bar */
    .account-layout {
        flex-direction: column;
    }

    .account-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8ecf0;
        padding: 16px 0;
    }

    .account-sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0 16px;
        gap: 4px;
    }

    .account-sidebar-nav li a {
        padding: 10px 16px;
        white-space: nowrap;
        border-radius: 8px;
    }

    .account-content {
        padding: 24px 16px;
    }

    .nav-section {
        display: contents;
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }

    .nav-section-heading {
        display: none;
    }

    .nav-section-items {
        display: contents;
    }

    .nav-section-items li a {
        padding: 10px 16px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 28px;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .footer-brand img {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 16px;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .btn {
        padding: 13px 24px;
        font-size: 15px;
    }

    .price-amount {
        font-size: 40px;
    }
}

/* ================================================================
   Signup Wizard
   ================================================================ */

.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity .3s;
}

.wizard-step--active {
    opacity: 1;
}

.wizard-step--done {
    opacity: 0.7;
}

.wizard-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8ecf0;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    transition: background .3s, color .3s;
}

.wizard-step--active .wizard-step-number {
    background: #538faa;
    color: #fff;
}

.wizard-step--done .wizard-step-number {
    background: #4caf50;
    color: #fff;
}

.wizard-step-label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.wizard-step--active .wizard-step-label {
    color: #222;
}

.wizard-step-divider {
    width: 48px;
    height: 2px;
    background: #e8ecf0;
    margin: 0 16px;
}

.tier-card--selectable {
    position: relative;
    cursor: pointer;
}

.tier-card--selectable.tier-card--selected {
    border-color: #538faa;
    background: #f0f6fa;
    box-shadow: 0 4px 16px rgba(83, 143, 170, 0.15);
}

@media (max-width: 600px) {
    .wizard-step-label {
        display: none;
    }
    .wizard-step-divider {
        width: 32px;
        margin: 0 8px;
    }
}

/* ================================================================
   Admin Section
   ================================================================ */

/* --- Page Header --- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.page-header h1 {
    margin-bottom: 0;
}

/* --- Card --- */
.card {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f5;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    padding: 20px 24px;
    text-align: center;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #222;
}

/* --- Table Wrapper --- */
.table-wrapper {
    overflow-x: auto;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrapper th {
    text-align: left;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f7f9fb;
    border-bottom: 2px solid #e8ecf0;
    white-space: nowrap;
}

.table-wrapper td {
    padding: 12px 14px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f2f5;
}

.table-wrapper tr:hover td {
    background: #fafbfc;
}

/* --- Form Row (two columns) --- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-hint {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* --- Actions row --- */
.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Badge variants (admin) --- */
.badge-success { background: #d4edda; color: #155724; }
.badge-danger  { background: #f8d7da; color: #721c24; }
.badge-info    { background: #d1ecf1; color: #0c5460; }
.badge-muted   { background: #e9ecef; color: #495057; }
.badge-warning { background: #fff3cd; color: #856404; }

/* --- Utility classes --- */
.text-sm    { font-size: 13px; }
.text-muted { color: #888; }
.text-right { text-align: right; }
.mb-2       { margin-bottom: 16px; }
.mt-1       { margin-top: 8px; }

/* --- Sidebar admin section --- */
.account-sidebar-divider {
    height: 1px;
    background: #e8ecf0;
    margin: 16px 0;
}

.account-sidebar-heading {
    padding: 8px 20px 4px;
    font-size: 11px;
    font-weight: 700;
    color: #8899a6;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

@media (max-width: 768px) {
    .account-sidebar-divider {
        display: none;
    }
    .account-sidebar-heading {
        display: none;
    }
}
