/* ============================================
   BOLTON MODERN MARKETS - SHARED STYLES
   ============================================ */

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

:root {
    /* Brand Colors */
    --bolton-teal: #1A4A4A;
    --bolton-teal-light: #236363;
    --bolton-teal-dark: #0F3535;

    /* Neutrals */
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --light-gray: #E9ECEF;
    --medium-gray: #6C757D;
    --dark-gray: #343A40;
    --black: #1A1A1A;

    /* Accent */
    --accent-gold: #C9A962;

    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.12);

    /* Spacing */
    --nav-height: 70px;
    --nav-height-mobile: 60px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark-gray);
    line-height: 1.6;
    background: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    height: var(--nav-height);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    z-index: 1001;
}

.logo-main {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    color: var(--bolton-teal);
    letter-spacing: 0.08em;
    line-height: 1;
}

.logo-sub {
    font-size: 0.6rem;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 2px;
}

/* Desktop Navigation Links */
.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--bolton-teal);
}

.nav-links a.active {
    color: var(--bolton-teal);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bolton-teal);
    transition: width 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark-gray);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle span:nth-child(1) {
    transform: translateY(-6px);
}

.nav-toggle span:nth-child(3) {
    transform: translateY(6px);
}

/* Hamburger Animation */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(0) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
}

/* Mobile Navigation Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.nav-overlay.active {
    opacity: 1;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding: 140px 24px 80px;
    background: linear-gradient(135deg, var(--bolton-teal) 0%, var(--bolton-teal-dark) 100%);
    color: var(--white);
    text-align: center;
}

.hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.95;
    margin-bottom: 8px;
    font-weight: 500;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--bolton-teal);
    margin-bottom: 48px;
    text-align: center;
    letter-spacing: 0.03em;
}

.section-alt {
    background: var(--light-gray);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--bolton-teal);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--bolton-teal-light);
    transform: scale(1.02);
}

.btn-secondary {
    background: var(--white);
    color: var(--bolton-teal);
    border: 2px solid var(--bolton-teal);
}

.btn-secondary:hover {
    background: var(--bolton-teal);
    color: var(--white);
}

.btn-white {
    background: var(--white);
    color: var(--bolton-teal);
}

.btn-white:hover {
    transform: scale(1.05);
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    background: linear-gradient(135deg, var(--bolton-teal) 0%, var(--bolton-teal-dark) 100%);
    padding: 80px 24px;
    text-align: center;
    color: var(--white);
}

.cta-section h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 16px;
    letter-spacing: 0.03em;
}

.cta-section p {
    margin-bottom: 32px;
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 32px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 48px 24px;
    text-align: center;
}

.footer p {
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer p + p {
    margin-top: 8px;
}

.footer a {
    color: var(--white);
    text-decoration: none;
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.text-teal {
    color: var(--bolton-teal);
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablets (768px and below) */
@media (max-width: 768px) {
    :root {
        --nav-height: var(--nav-height-mobile);
    }

    .nav-container {
        padding: 0 16px;
    }

    .logo-main {
        font-size: 1.4rem;
    }

    .logo-sub {
        font-size: 0.55rem;
    }

    /* Show hamburger menu */
    .nav-toggle {
        display: flex;
    }

    /* Mobile navigation menu */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 100px 32px 32px;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        border-bottom: 1px solid var(--light-gray);
    }

    .nav-links a {
        display: block;
        padding: 16px 0;
        font-size: 1rem;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-overlay {
        display: block;
    }

    /* Hero adjustments */
    .hero {
        padding: 110px 20px 60px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Section adjustments */
    .section {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 32px;
    }

    /* CTA adjustments */
    .cta-section {
        padding: 60px 20px;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    /* Footer adjustments */
    .footer {
        padding: 40px 20px;
    }
}

/* Large phones (480px and below) */
@media (max-width: 480px) {
    .hero {
        padding: 100px 16px 50px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .section {
        padding: 50px 16px;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 28px;
    }

    .card {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }

    .cta-section {
        padding: 50px 16px;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .cta-section p {
        font-size: 1rem;
    }

    .footer {
        padding: 32px 16px;
    }

    .footer p {
        font-size: 0.85rem;
    }
}

/* Small phones (374px and below) */
@media (max-width: 374px) {
    .nav-container {
        padding: 0 12px;
    }

    .logo-main {
        font-size: 1.25rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 40px 12px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card {
        padding: 20px 16px;
    }
}

/* Desktop and up (1024px+) */
@media (min-width: 1024px) {
    .hero {
        padding: 160px 40px 100px;
    }

    .hero h1 {
        font-size: 4rem;
    }

    .section {
        padding: 100px 40px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .card:active,
    .btn:active {
        transform: scale(0.98);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   MACHINE FRAME (Content Pages)
   Creates visual continuity with homepage vending machine
   ============================================ */

.machine-frame {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    min-height: 100vh;
    padding: 0;
}

.machine-frame .nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.machine-frame .content-viewport {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--off-white);
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.05),
        0 0 80px rgba(0, 0, 0, 0.4);
    position: relative;
    min-height: calc(100vh - var(--nav-height));
}

/* Subtle machine edge effect */
.machine-frame .content-viewport::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--bolton-teal-dark) 0%,
        var(--bolton-teal) 50%,
        var(--bolton-teal-dark) 100%
    );
}

/* Machine side rails */
.machine-frame .content-viewport::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    box-shadow:
        inset 8px 0 20px -8px rgba(0, 0, 0, 0.15),
        inset -8px 0 20px -8px rgba(0, 0, 0, 0.15);
}

/* Adjust hero within machine frame */
.machine-frame .hero {
    position: relative;
}

/* Machine frame footer gets special treatment */
.machine-frame .footer {
    background: linear-gradient(180deg, var(--dark-gray) 0%, #1a1a1a 100%);
    position: relative;
}

.machine-frame .footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: var(--bolton-teal);
    border-radius: 2px 2px 0 0;
    opacity: 0.6;
}

/* Responsive machine frame */
@media (max-width: 1440px) {
    .machine-frame .content-viewport {
        max-width: 100%;
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    .machine-frame {
        background: var(--dark-gray);
    }

    .machine-frame .content-viewport {
        margin: 0 8px;
        box-shadow:
            inset 0 0 30px rgba(0, 0, 0, 0.03),
            0 0 40px rgba(0, 0, 0, 0.3);
    }

    .machine-frame .content-viewport::after {
        box-shadow:
            inset 4px 0 12px -4px rgba(0, 0, 0, 0.1),
            inset -4px 0 12px -4px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    .machine-frame .content-viewport {
        margin: 0 4px;
    }
}

/* Print styles */
@media print {
    .nav,
    .nav-toggle,
    .nav-overlay {
        display: none !important;
    }

    .hero {
        padding-top: 40px;
        background: var(--bolton-teal) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .machine-frame {
        background: white !important;
    }

    .machine-frame .content-viewport {
        box-shadow: none !important;
        margin: 0 !important;
    }
}
