/* =========================================================
   123MACPC — Master Stylesheet
   Converted from "Wow! Small Business Pow!" template.
   Dark-theme nav, responsive, modern viewport standards
   (dvh / svh / lvh). Brand: 123 MAC PC IT Services.
   ========================================================= */

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

:root {
    /* 123MACPC palette — silver/navy with red and gold accents */
    --color-dark: #0b1d3a;          /* deep navy */
    --color-dark-2: #143161;        /* mid navy */
    --color-dark-3: #1c4690;        /* royal blue */
    --color-accent: #d62828;        /* MAC PC red */
    --color-accent-2: #f8b400;      /* warm gold */
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-soft: #f4f6fb;
    --color-border: #e5e7eb;
    --color-link: #1c4690;

    /* Layout */
    --max-width: 1240px;
    --radius: 10px;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.10);
    --transition: 0.3s ease;

    /* Typography */
    --font-stack: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    font-family: var(--font-stack);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    /* New viewport unit — full dynamic viewport on mobile */
    min-height: 100dvh;
    overflow-x: hidden;
}

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

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* =========================================================
   Top Utility Bar — phone numbers &amp; map pins
   Visible on mobile (matches lazarrelawfirm.com behavior)
   ========================================================= */
.top-bar {
    background: var(--color-dark);
    color: #fff;
    font-size: 0.85rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Respect device safe areas (notched phones) */
    padding-top: max(0.45rem, env(safe-area-inset-top));
}

.top-bar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.top-bar a:hover {
    color: var(--color-accent-2);
}

.top-bar .pin {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.top-bar svg {
    width: 14px;
    height: 14px;
    fill: var(--color-accent-2);
    flex-shrink: 0;
}

/* On wider desktops, condense the bar to the right (still visible) */
@media (min-width: 900px) {
    .top-bar {
        font-size: 0.8rem;
    }
    .top-bar-inner {
        justify-content: flex-end;
        gap: 1.5rem;
    }
}

/* =========================================================
   Header / Dropdown Nav  (dark theme)
   ========================================================= */
.site-header {
    background: var(--color-dark-2);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Allow the mobile nav panel to wrap onto its own row below brand+hamburger */
    flex-wrap: wrap;
    padding: 0.85rem 0;
    gap: 1rem;
    position: relative;
}

.brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1.1;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand .wow,
.brand .num {
    color: var(--color-accent-2);
}

.brand .pow,
.brand .pc {
    color: var(--color-accent);
}

.brand .mac {
    color: #ffffff;
}

.brand small {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    color: #cbd5e1;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (min-width: 1100px) {
    .brand {
        font-size: 1.35rem;
    }
}

/* Hamburger button */
.hamburger {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

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

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

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

/* Primary nav — mobile defaults: hidden, drops to full-width row when open */
.primary-nav {
    display: none;
    /* When shown via .is-open on mobile, occupy a full row below brand+hamburger */
    flex-basis: 100%;
    width: 100%;
    order: 3;
    background: var(--color-dark-2);
    margin: 0.5rem -1.25rem -0.85rem; /* bleed to the edges of .container padding */
    padding: 0.25rem 0 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.primary-nav.is-open {
    display: block;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.primary-nav a {
    color: #fff;
    display: block;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-weight: 600;
}

.primary-nav a:hover,
.primary-nav a.active {
    background: var(--color-dark-3);
    color: var(--color-accent-2);
}

/* Dropdown items — collapsible on every viewport */
.has-dropdown {
    position: relative;
}

.has-dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.has-dropdown > a::after {
    content: "▾";
    font-size: 0.95rem;
    opacity: 0.85;
    flex-shrink: 0;
    transition: transform var(--transition);
    display: inline-block;
}

.has-dropdown.is-open > a::after {
    transform: rotate(180deg);
}

/* Mobile: collapsible accordion via animated max-height */
.dropdown {
    list-style: none;
    background: var(--color-dark-3);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
    border-left: 3px solid var(--color-accent);
}

.has-dropdown.is-open .dropdown {
    /* Large enough for any sub-list while still animating smoothly */
    max-height: 600px;
}

.dropdown a {
    padding-left: 2.25rem;
    font-weight: 400;
    font-size: 0.95rem;
    border-top-color: rgba(255, 255, 255, 0.04);
}

/* Desktop nav */
@media (min-width: 900px) {
    .header-inner {
        flex-wrap: nowrap;
    }

    .hamburger {
        display: none;
    }

    .primary-nav {
        display: block !important;
        /* Reset the mobile full-row behavior */
        flex-basis: auto;
        width: auto;
        order: 0;
        background: transparent;
        margin: 0;
        padding: 0;
        border-top: 0;
    }

    .primary-nav ul {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.25rem;
        align-items: center;
    }

    .primary-nav > ul > li {
        position: relative;
    }

    .primary-nav a {
        border-top: 0;
        padding: 0.65rem 1rem;
        border-radius: 6px;
        white-space: nowrap;
    }

    /* Desktop dropdowns: click-to-toggle (collapsible).
       Reset the mobile max-height animation; use display swap instead. */
    .has-dropdown .dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        box-shadow: var(--shadow-md);
        border-radius: 0 0 var(--radius) var(--radius);
        z-index: 1001;
        display: none;
        overflow: visible;
        max-height: none;
        border-left: 0;
        transition: none;
    }

    .has-dropdown.is-open .dropdown {
        display: block;
        max-height: none;
    }

    .dropdown a {
        padding: 0.7rem 1rem;
    }
}

/* =========================================================
   Hero Section — 2 columns
   Left: content   |   Right: Jotform iframe
   ========================================================= */
.hero {
    position: relative;
    background: linear-gradient(135deg, #1a2434 0%, #243044 100%);
    color: #fff;
    overflow: hidden;
    padding: 3rem 0;
    /* Modern dynamic viewport unit so it works on iOS Safari */
    min-height: 60dvh;
}

/* 28% future opaque image — placeholder for future configuration.
   Uncomment and set background-image when ready.
   .hero::before {
       content: "";
       position: absolute;
       inset: 0;
       background-image: url("images/hero-bg.jpg");
       background-size: cover;
       background-position: center;
       opacity: 0.28;
       pointer-events: none;
       z-index: 0;
   }
*/

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(1.85rem, 4vw, 3rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero-content h1 .wow {
    color: var(--color-accent-2);
}

.hero-content h1 .pow {
    color: var(--color-accent);
}

.hero-content p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: #d1d5db;
    max-width: 55ch;
}

.btn {
    display: inline-block;
    padding: 0.85rem 1.6rem;
    background: var(--color-accent);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition);
}

.btn:hover {
    background: #ff8051;
    transform: translateY(-2px);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 2px solid #fff;
    margin-left: 0.5rem;
}

.btn-ghost:hover {
    background: #fff;
    color: var(--color-dark);
}

/* Jotform iframe wrapper */
.hero-form {
    background: #fff;
    border-radius: var(--radius);
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
    min-height: 480px;
}

.hero-form iframe {
    width: 100%;
    min-height: 480px;
    border: 0;
    border-radius: 8px;
    display: block;
}

@media (min-width: 900px) {
    .hero-inner {
        grid-template-columns: 1.1fr 0.9fr;
    }
    .hero {
        padding: 5rem 0;
    }
}

/* =========================================================
   Main Content — 2 columns + sidebar with watermark images
   ========================================================= */
.main-section {
    padding: 3rem 0;
    background: var(--color-bg-soft);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--color-dark);
}

.section-title p {
    color: var(--color-text-light);
    margin-top: 0.5rem;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.main-content {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Watermark images (Google / Yahoo) at 40% opacity */
.watermark {
    position: absolute;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

.watermark.wm-1 {
    top: 1rem;
    right: 1rem;
    width: 90px;
}

.watermark.wm-2 {
    bottom: 1rem;
    left: 1rem;
    width: 90px;
}

.watermark.wm-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    opacity: 0.08;
}

.content-cols {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.content-cols h3 {
    color: var(--color-dark);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.content-cols p {
    margin-bottom: 1rem;
    color: #374151;
}

.sidebar {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-dark);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.5rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    border-bottom: 1px solid var(--color-border);
}

.sidebar li:last-child {
    border-bottom: 0;
}

.sidebar a {
    display: block;
    padding: 0.6rem 0;
    color: var(--color-link);
    font-size: 0.95rem;
}

.sidebar a:hover {
    color: var(--color-accent);
    padding-left: 0.4rem;
}

@media (min-width: 768px) {
    .content-cols {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr 300px;
    }
}

/* =========================================================
   Our Services — 4 Card Flippers
   ========================================================= */
.services-section {
    padding: 4rem 0;
    background: #fff;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.flip-card {
    background: transparent;
    perspective: 1000px;
    height: 280px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner,
.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.flip-card-front {
    background: linear-gradient(135deg, var(--color-dark-2), var(--color-dark-3));
    color: #fff;
}

.flip-card-front .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-accent-2);
}

.flip-card-front h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.flip-card-back {
    background: linear-gradient(135deg, var(--color-accent), #ff8c5a);
    color: #fff;
    transform: rotateY(180deg);
}

.flip-card-back p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.flip-card-back .btn {
    background: #fff;
    color: var(--color-accent);
}

.flip-card-back .btn:hover {
    background: var(--color-dark);
    color: #fff;
}

@media (min-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================================================
   What Clients Say — Reviews carousel (3 of 8 rotating)
   ========================================================= */
.reviews-section {
    padding: 4rem 0;
    background: var(--color-bg-soft);
}

.reviews-track-wrap {
    overflow: hidden;
    margin-top: 2rem;
}

.reviews-track {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    transition: opacity 0.4s ease;
}

.review-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 4px solid var(--color-accent);
}

.review-stars {
    color: var(--color-accent-2);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.review-text {
    font-style: italic;
    color: #374151;
}

.review-author {
    font-weight: 700;
    color: var(--color-dark);
    margin-top: auto;
}

.review-author small {
    display: block;
    font-weight: 400;
    color: var(--color-text-light);
    font-size: 0.8rem;
}

.reviews-controls {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.reviews-controls button {
    background: var(--color-dark-2);
    color: #fff;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background var(--transition);
}

.reviews-controls button:hover {
    background: var(--color-accent);
}

.reviews-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.reviews-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: #cbd5e1;
    cursor: pointer;
    padding: 0;
}

.reviews-dots button.active {
    background: var(--color-accent);
    width: 28px;
    border-radius: 6px;
}

@media (min-width: 700px) {
    .reviews-track {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .reviews-track {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================================
   Footer  —  70% / 30% two-column block
   + lower row: socials | quick links | services | locations(2col)
   ========================================================= */
.site-footer {
    background: var(--color-dark);
    color: #cbd5e1;
    padding: 3rem 0 1.5rem;
    /* Account for iOS home indicator */
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top-left h2 {
    color: #fff;
    margin-bottom: 0.75rem;
}

.footer-top-left p {
    max-width: 60ch;
}

.footer-top-right {
    background: var(--color-dark-2);
    padding: 1.25rem;
    border-radius: var(--radius);
}

.footer-top-right h3 {
    color: var(--color-accent-2);
    margin-bottom: 0.5rem;
}

@media (min-width: 900px) {
    .footer-top {
        grid-template-columns: 70% 30%;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

.footer-grid h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid li {
    margin-bottom: 0.5rem;
}

.footer-grid a {
    color: #cbd5e1;
    font-size: 0.95rem;
}

.footer-grid a:hover {
    color: var(--color-accent-2);
}

.socials {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.socials a {
    width: 40px;
    height: 40px;
    background: var(--color-dark-2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), transform var(--transition);
}

.socials a:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
    color: #fff;
}

.socials svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    color: #fff;
}

.locations-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.locations-cols address {
    font-style: normal;
    font-size: 0.9rem;
    line-height: 1.5;
}

.locations-cols address strong {
    display: block;
    color: #fff;
    margin-bottom: 0.25rem;
}

@media (min-width: 700px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #94a3b8;
}

/* =========================================================
   Generic page (Page2..Page6) inner content area
   ========================================================= */
.page-hero {
    background: linear-gradient(135deg, #1a2434 0%, #243044 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.page-hero p {
    color: #cbd5e1;
    max-width: 60ch;
    margin: 0.75rem auto 0;
}

/* Reduce motion — accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
