/* ==========================================================================
   Tina's Tote Rental — shared site chrome
   --------------------------------------------------------------------------
   Loaded by every page. Contains ONLY what is common to all of them:
   brand colours, the reset, the fixed header/nav, the footer, the sticky
   mobile call/text bar, and the two button styles.

   Page-specific styling stays in that page's own <style> block.

   Change brand colours in :root below and every page follows.
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-pink: #E91E8C;
    /* --dark-pink is the accessible pink: #E91E8C on white is only 4.18:1,
       which fails WCAG AA for normal-size text. Use --dark-pink for anything
       that is not large display type. */
    --dark-pink: #C21874;
    --yellow: #FFD700;
    --black: #1a1a1a;
    --navy: #1e3a5f;
    --white: #ffffff;
    --light-gray: #f5f5f5;

    /* Height of the fixed header at each breakpoint, rounded up from the
       measured 108.6px / 88px. Body padding and the anchor-scroll offset are
       both derived from these, so the header and the content below it can
       never drift apart again. */
    --header-h: 110px;
    --header-h-mobile: 90px;
}

/* Offset anchor jumps so headings clear the fixed header.
   scroll-padding-top (on the scroll container) and scroll-margin-top (on the
   target) are ADDITIVE — using both double-counts the offset. */
html {
    scroll-padding-top: calc(var(--header-h) + 12px);
}

/* The width/height attributes on <img> are presentational hints. Without an
   explicit height:auto they win over the intrinsic ratio and stretch fluid
   images vertically. */
img {
    max-width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--navy);
    padding-top: var(--header-h);
}

h1, h2, h3 {
    font-weight: 700;
}

a {
    text-decoration: none;
}

/* ==========================================================================
   Header & navigation
   ========================================================================== */

header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

/* Sizing lives here, not in an inline style — an inline height outranks the
   mobile media query and stops the logo shrinking.
   No border-radius: the badge is a rounded tote shape with its own outline,
   and a 50% radius would clip its corners off. */
/* display:block on both — an inline <picture>/<img> sits on a text baseline and
   adds ~6px of descender space, which pushed the header taller than --header-h. */
.logo picture {
    display: block;
}

.logo img {
    height: 78px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--navy);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--dark-pink);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.phone-number {
    background: var(--yellow);
    color: var(--black);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.text-number {
    background: var(--white);
    color: var(--dark-pink);
    border: 2px solid var(--dark-pink);
    padding: 0.75rem 1.4rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    white-space: nowrap;
}

.text-number:hover {
    background: var(--dark-pink);
    color: var(--white);
}

@media (max-width: 900px) {
    .text-number {
        display: none;
    }
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--navy);
    border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Collapse to the hamburger at 968px, not 768px: between those widths the
   logo + 4 links + phone pill were crowding each other on small tablets. */
@media (max-width: 968px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: var(--white);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 0.5rem 0;
    }

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

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem 5%;
    }

    .nav-links a:hover {
        background: var(--light-gray);
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary {
    background: var(--yellow);
    color: var(--black);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-secondary {
    background: var(--white);
    color: var(--dark-pink);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}

/* hover:hover guard — on touchscreens these states stick after a tap */
@media (hover: hover) {
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background: var(--black);
    color: var(--white);
    text-align: center;
    padding: 3rem 5%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    margin-bottom: 2rem;
}

/* Square crop: the homepage uses a portrait photo here, and a fixed height
   plus border-radius:50% squashed it into an ellipse. */
.footer-logo img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
}

/* City-page footers show the logo badge rather than the homepage photo, so it
   needs its natural 1.84:1 shape instead of the square crop above. */
.footer-logo--badge img {
    width: auto;
    height: auto;
    max-width: 280px;
    border-radius: 0;
    object-fit: contain;
}

.footer-info {
    margin: 2rem 0;
}

.footer-info p {
    margin: 0.5rem 0;
}

.footer-phone {
    font-size: 2rem;
    color: var(--yellow);
    font-weight: 800;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem 0;
}

/* Social / profile row: Facebook, Google Business Profile, review link */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.75rem;
    margin-top: 1.25rem;
}

.footer-links a {
    color: var(--yellow);
    text-decoration: none;
    font-weight: 700;
    /* 26px of text alone is an uncomfortably small tap target on a phone */
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-city-link {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-city-link:hover {
    color: var(--yellow);
    text-decoration: underline;
}

/* #666 on #1a1a1a is only 3.0:1 and fails AA at this size. */
.footer-copyright {
    margin-top: 3rem;
    color: #999;
    font-size: 0.9rem;
}

.footer-copyright a {
    color: #ccc;
}

/* The page-level h2 rule (2.5rem, decorative ::after bar) must not leak into
   the footer heading. */
footer h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

footer h2::after {
    display: none;
}

/* ==========================================================================
   Sticky mobile call/text bar
   Phone is the fastest path to a booking and most traffic here is mobile.
   Hidden on desktop, where the header already carries both actions.
   ========================================================================== */

.mobile-cta-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-cta-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1100;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
        padding-bottom: env(safe-area-inset-bottom);
        background: var(--navy);
    }

    .mobile-cta-bar a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        min-height: 60px;
        padding: 0.75rem 0.5rem;
        font-size: 1.05rem;
        font-weight: 800;
        text-decoration: none;
    }

    .mobile-cta-call {
        background: var(--yellow);
        color: var(--black);
    }

    .mobile-cta-text {
        background: var(--navy);
        color: var(--white);
    }
}

/* ==========================================================================
   Shared mobile adjustments
   ========================================================================== */

@media (max-width: 768px) {
    html {
        scroll-padding-top: calc(var(--header-h-mobile) + 12px);
    }

    body {
        padding-top: var(--header-h-mobile);
        /* clear the sticky call/text bar */
        padding-bottom: 72px;
    }

    .logo img {
        height: 56px;
    }

    .phone-number {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .footer-logo img {
        width: 140px;
        height: 140px;
    }

    /* Same specificity as the rule above, so it must be restated here or source
       order squashes the badge into a 140px square. */
    .footer-logo--badge img {
        width: auto;
        height: auto;
        max-width: 220px;
    }
}

@media (max-width: 380px) {
    .phone-number {
        font-size: 0.68rem;
        padding: 0.5rem 0.6rem;
    }

    /* logo height deliberately not reduced further here — at 56px the badge
       still fits alongside the shrunken phone pill down to ~340px, and
       shrinking it would leave the header shorter than --header-h-mobile. */
}
