/*
 * Opentable Theme — Global Layout & Structural Overrides
 * Reference: https://www.opentable.org/
 *
 * Load order: plugin tokens → theme tokens → this file → per-block overrides.
 */

/* ============================================================
   1. GLOBAL RESET / BASE
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--appskey-color-bg);
    color: var(--appskey-color-text);
    font-family: var(--appskey-font-body);
    font-size: 15px;
    line-height: 1.8;
}

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

a {
    color: var(--appskey-color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--appskey-color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--appskey-font-heading);
    color: var(--appskey-color-dark);
    margin-top: 0;
}

/* Screen-reader utility (used by social icon labels) */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
}

.skip-link:focus {
    top: 0;
    z-index: 9999;
    background: #fff;
    padding: 0.5rem 1rem;
}

/* ============================================================
   2. WRAPPER / CONTAINER
   ============================================================ */

#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ============================================================
   3. TOP BAR
   ============================================================ */

#top-bar-wrap {
    background-color: var(--appskey-color-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.8125rem; /* 13px */
    font-family: var(--appskey-font-body);
}

#top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Left: translate widget + nav links */
#top-bar-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

#top-bar-content a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

#top-bar-content a:hover {
    opacity: 0.8;
    color: #ffffff;
}

/* Google Translate */
.goog-te-gadget {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.goog-te-gadget a,
.goog-te-gadget a:visited {
    color: #ffffff !important;
}

.goog-te-combo {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.75rem;
    cursor: pointer;
    max-width: 160px;
}

.goog-te-combo option {
    background: #ffffff;
    color: #333333;
}

.goog-logo-link img {
    height: 14px;
    width: auto;
    vertical-align: middle;
}

/* Right: social icons */
#top-bar-social-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.7rem;
    align-items: center;
}

.top-bar-social-list__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    color: #ffffff;
    transition: opacity 0.15s;
}

.top-bar-social-list__link svg {
    width: 100%;
    height: 100%;
    fill: #ffffff;
}

.top-bar-social-list__link:hover {
    opacity: 0.7;
}

@media (max-width: 767px) {
    #top-bar {
        flex-direction: column;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
        text-align: center;
    }

    #top-bar-content {
        justify-content: center;
    }

    #top-bar-social-list {
        justify-content: center;
    }
}

/* ============================================================
   4. STICKY SITE HEADER
   ============================================================ */

#site-header-wrap {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
}

/* Logo */
.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-branding .custom-logo {
    height: 55px;
    width: auto;
    display: block;
}

.site-title {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.2;
}

.site-title a {
    color: var(--appskey-color-dark);
    font-weight: 700;
    text-decoration: none;
}

.site-title a:hover {
    color: var(--appskey-color-primary);
}

/* ============================================================
   5. PRIMARY NAVIGATION
   ============================================================ */

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

/* Top-level list */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.main-navigation > ul > li {
    position: relative;
}

.main-navigation > ul > li > a {
    display: block;
    padding: 0 0.9rem;
    color: #333333;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 75px;
    transition: color 0.2s;
    white-space: nowrap;
}

.main-navigation > ul > li > a:hover,
.main-navigation > ul > li.current-menu-item > a,
.main-navigation > ul > li.current-menu-parent > a,
.main-navigation > ul > li.current-menu-ancestor > a {
    color: var(--appskey-color-primary);
}

/* Dropdown */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    border-top: 2px solid var(--appskey-color-primary);
    z-index: 100;
    flex-direction: column;
}

.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul {
    display: flex;
}

.main-navigation ul ul li a {
    display: block;
    padding: 0.65rem 1.25rem;
    color: #444444;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.5;
    border-bottom: 1px solid #f2f2f2;
    transition: background-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.main-navigation ul ul li a:hover {
    background-color: var(--appskey-color-bg-alt);
    color: var(--appskey-color-primary);
}

.main-navigation ul ul li:last-child a {
    border-bottom: none;
}

/* ============================================================
   6. MOBILE MENU
   ============================================================ */

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: #333333;
    transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    display: block;
    width: 26px;
    height: 2px;
    background: #333333;
    margin-top: 5px;
    transition: transform 0.25s;
}

/* Animate to X when open */
.main-navigation.toggled .menu-toggle span {
    background: transparent;
}

.main-navigation.toggled .menu-toggle span::before {
    transform: translateY(7px) rotate(45deg);
}

.main-navigation.toggled .menu-toggle span::after {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 959px) {
    .menu-toggle {
        display: flex;
    }

    /* Mobile dropdown panel */
    .main-navigation ul.nav-menu {
        display: none;
        position: absolute;
        top: 75px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 2px solid var(--appskey-color-primary);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        max-height: calc(100vh - 75px);
        overflow-y: auto;
    }

    .main-navigation.toggled ul.nav-menu {
        display: flex;
    }

    .main-navigation > ul > li > a {
        line-height: 1;
        padding: 0.9rem 1.5rem;
        border-bottom: 1px solid #eeeeee;
        font-size: 0.85rem;
    }

    /* Sub-menus always visible (indented) on mobile */
    .main-navigation ul ul {
        display: block;
        position: static;
        box-shadow: none;
        border-top: none;
        border-left: 3px solid var(--appskey-color-primary);
        margin-left: 1.5rem;
        background: #fafafa;
        min-width: 0;
    }
}

/* ============================================================
   7. SITE CONTENT
   ============================================================ */

#content {
    flex: 1;
    padding: 0;
}

/* ============================================================
   8. SITE FOOTER
   ============================================================ */

#colophon {
    background-color: var(--appskey-color-dark);
    color: rgba(255, 255, 255, 0.7);
}

/* ── Footer widgets grid ── */

#footer-widgets {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-widgets-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.2fr;
    gap: 3rem;
}

.footer-widget-title {
    font-family: var(--appskey-font-heading);
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

/* ── Contact list ── */

.footer-contact-list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact-list__item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}

.footer-contact-list__icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 3px;
    fill: rgba(255, 255, 255, 0.55);
    display: inline-flex;
}

.footer-contact-list__icon svg {
    width: 100%;
    height: 100%;
    fill: rgba(255, 255, 255, 0.55);
}

.footer-contact-list__item a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-contact-list__item a:hover {
    color: var(--appskey-color-primary);
}

/* ── Footer flat social icon buttons ── */

.footer-social-list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    transition: opacity 0.15s;
}

.footer-social-btn svg {
    width: 16px;
    height: 16px;
    fill: #ffffff;
}

.footer-social-btn:hover {
    opacity: 0.85;
}

.footer-social-btn--facebook  { background-color: #1877f2; }
.footer-social-btn--instagram { background-color: #e4405f; }
.footer-social-btn--linkedin  { background-color: #0077b5; }
.footer-social-btn--twitter   { background-color: #000000; }
.footer-social-btn--youtube   { background-color: #ff0000; }

/* ── 501(c)3 text ── */

.footer-501c3 {
    font-size: 0.775rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    line-height: 1.6;
}

/* ── Partner logos ── */

.footer-partner-logos {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-partner-logos__row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-partner-logos__link {
    display: inline-flex;
    align-items: center;
}

.footer-partner-logos__link img {
    max-height: 60px;
    width: auto;
    filter: brightness(0.85) contrast(1.1);
    transition: filter 0.2s;
}

.footer-partner-logos__link:hover img {
    filter: brightness(1) contrast(1);
}

/* ── Newsletter (Bloomerang embed) ── */

.footer-newsletter {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
}

/* Override Bloomerang widget colours to match dark footer */
.footer-newsletter input[type="email"],
.footer-newsletter input[type="text"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border-radius: 3px;
    padding: 0.5rem 0.75rem;
    width: 100%;
    font-size: 0.875rem;
}

.footer-newsletter input[type="email"]::placeholder,
.footer-newsletter input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.footer-newsletter input[type="submit"],
.footer-newsletter button[type="submit"] {
    background-color: var(--appskey-color-primary);
    color: #ffffff;
    border: none;
    border-radius: 3px;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}

.footer-newsletter input[type="submit"]:hover,
.footer-newsletter button[type="submit"]:hover {
    background-color: var(--appskey-color-primary-dark);
}

/* ── Footer bottom bar ── */

#footer-bottom {
    background-color: #111111;
    padding: 1.25rem 1.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.footer-bottom-flex {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    align-items: center;
}

#copyright {
    margin: 0;
}

#footer-bottom a {
    color: var(--appskey-color-primary);
    text-decoration: none;
}

#footer-bottom a:hover {
    color: var(--appskey-color-primary-dark);
}

/* Footer bottom inline nav menu */
#footer-bottom #footer-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

#footer-bottom #footer-menu li a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.775rem;
}

#footer-bottom #footer-menu li a:hover {
    color: var(--appskey-color-primary);
}

@media (min-width: 768px) {
    #footer-bottom {
        text-align: left;
    }

    .footer-bottom-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    #footer-bottom #footer-menu {
        justify-content: flex-end;
    }
}

/* ── Responsive ── */

@media (max-width: 960px) {
    .footer-widgets-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .footer-col--newsletter {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .footer-widgets-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-col--newsletter {
        grid-column: auto;
    }
}

/* ============================================================
   9. HOME ICON BOXES (vc_custom_1636590008121)
   ============================================================ */

.home-icon-boxes {
    background-color: #ffffff;
    padding-top: 20px;
    padding-bottom: 40px;
}

.home-icon-boxes__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

/* ── Individual box ── */

.icon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
}

/* ── Circular icon ── */

.icon-box__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.icon-box__icon i {
    font-size: 2rem;
    color: #ffffff;
}

/* Icon colour variants */
.icon-box__icon--green    { background-color: #95c93d; }
.icon-box__icon--yellow   { background-color: #f9cb46; }
.icon-box__icon--purple   { background-color: #ae3092; }
.icon-box__icon--darkgreen { background-color: #3a7338; }

/* ── Heading ── */

.icon-box__heading {
    font-family: var(--appskey-font-heading);
    font-size: 1.2rem;
    color: var(--appskey-color-dark);
    margin-bottom: 0.75rem;
}

.icon-box__heading a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.icon-box__heading a:hover {
    color: var(--appskey-color-primary);
}

/* ── Description text ── */

.icon-box__text {
    font-size: 0.875rem;
    color: var(--appskey-color-text);
    line-height: 1.7;
    margin-bottom: 1rem;
    flex: 1; /* pushes "Learn more" to the bottom */
}

/* ── Learn more link ── */

.icon-box__link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--appskey-color-primary);
    text-decoration: none;
    transition: color 0.2s;
    margin-top: auto;
}

.icon-box__link:hover {
    color: var(--appskey-color-primary-dark);
    text-decoration: underline;
}

/* ── Responsive ── */

@media (max-width: 959px) {
    .home-icon-boxes__inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .home-icon-boxes__inner {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   11. BUTTONS (global)
   ============================================================ */

.wp-block-button__link,
.btn,
button[type="submit"],
input[type="submit"] {
    background-color: var(--appskey-btn-bg);
    color: #ffffff;
    padding: var(--appskey-btn-padding);
    border-radius: var(--appskey-border-radius);
    font-family: var(--appskey-font-body);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: var(--appskey-btn-text-transform);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    display: inline-block;
}

.wp-block-button__link:hover,
.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: var(--appskey-color-primary-dark);
    color: #ffffff;
}

/* ============================================================
   BLOCK DEFAULT PADDING
   40px top/bottom applied to all appskey section and item blocks.
   The WordPress spacing control (Dimensions panel in the editor)
   overrides these with an inline style when the user sets a custom value.
   ============================================================ */

.wp-block-appskey-blocks-hero,
.wp-block-appskey-blocks-home-banner,
.wp-block-appskey-blocks-mission-statement,
.wp-block-appskey-blocks-icon-list,
.wp-block-appskey-blocks-icon-boxes,
.wp-block-appskey-blocks-icon-box-item,
.wp-block-appskey-blocks-features,
.wp-block-appskey-blocks-cta-banner,
.wp-block-appskey-blocks-testimonials,
.wp-block-appskey-blocks-faq,
.wp-block-appskey-blocks-about,
.wp-block-appskey-blocks-stats,
.wp-block-appskey-blocks-team,
.wp-block-appskey-blocks-pricing,
.wp-block-appskey-blocks-contact-form,
.wp-block-appskey-blocks-contact-info,
.wp-block-appskey-blocks-section-heading,
.wp-block-appskey-blocks-news-carousel,
.wp-block-appskey-blocks-photo-gallery,
.wp-block-appskey-blocks-feature-item,
.wp-block-appskey-blocks-testimonial-item,
.wp-block-appskey-blocks-faq-item,
.wp-block-appskey-blocks-stat-item,
.wp-block-appskey-blocks-process-step,
.wp-block-appskey-blocks-team-member,
.wp-block-appskey-blocks-pricing-plan,
.wp-block-appskey-blocks-page-hero {
    padding-top: 40px;
    padding-bottom: 40px;
}
