/* ===============================================
   ADAM'S SHOE REPAIR - Modern CSS with Dark/Light Theme
   =============================================== */

/* CSS Variables for Theming */
:root {
    /* Light Theme Colors - Based on Logo */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-tertiary: #6c757d;
    --primary-color: #FF5722;  /* Orange from logo */
    --secondary-color: #4054B2; /* Blue from logo */
    --accent: #FF5722;         /* Orange accent */
    --accent-hover: #E64919;   /* Darker orange */
    --border: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --overlay: rgba(0, 0, 0, 0.7);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Bebas Neue', cursive;

    /* Spacing */
    --section-padding: 100px 0;
    --container-width: 1200px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Theme Colors - Based on Logo */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --primary-color: #FF6B35;  /* Orange from logo (lighter for dark) */
    --secondary-color: #5B6FD8; /* Blue from logo (lighter for dark) */
    --accent: #FF6B35;         /* Orange accent */
    --accent-hover: #FF8A65;   /* Lighter orange */
    --border: #333333;
    --shadow: rgba(0, 0, 0, 0.5);
    --card-bg: #1a1a1a;
    --overlay: rgba(0, 0, 0, 0.9);
}

/* ===============================================
   RESET & BASE STYLES
   =============================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

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

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

ul {
    list-style: none;
}

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

/* ===============================================
   THEME TOGGLE
   =============================================== */

.theme-toggle {
    position: fixed;
    top: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1000;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--accent);
    color: white;
    transform: rotate(180deg);
}

/* ===============================================
   LOGO STYLING
   =============================================== */

.logo-img {
    /* Blend logo with background */
    background-color: transparent;
    isolation: isolate;
}

/* Light mode - multiply to remove white background */
:root .logo-img {
    mix-blend-mode: darken;
}

/* Dark mode - screen to make logo visible */
[data-theme="dark"] .logo-img {
    filter: invert(1) hue-rotate(180deg);
    mix-blend-mode: screen;
}

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

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--secondary-color);
    z-index: 999;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-placeholder {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 16px;
    color: white;
    font-weight: bold;
}

.brand-text {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    z-index: -2;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
    margin-bottom: 20px;
}

.title-line {
    display: block;
    letter-spacing: 3px;
}

.title-line.accent {
    color: var(--accent);
    font-size: clamp(3.5rem, 9vw, 7rem);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 1px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 35px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--shadow);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.hero-hemisphere {
    position: absolute;
    right: -350px;  /* Half the width to create hemisphere */
    top: 50%;
    transform: translateY(-50%);
    width: 700px;
    height: 700px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
    opacity: 0.4;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}

.hero-hemisphere img {
    width: 120%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    margin-left: -20%;  /* Shift image left to show more of right side */
}

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

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 20px;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 60px;
    font-size: 1.1rem;
    font-weight: 300;
}

/* ===============================================
   SERVICES SECTION
   =============================================== */

.services {
    padding: var(--section-padding);
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.service-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow);
    border-color: var(--accent);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--secondary-color);
    letter-spacing: 1px;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===============================================
   PORTFOLIO SECTION
   =============================================== */

.portfolio {
    padding: var(--section-padding);
    background-color: var(--bg-primary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

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

.before-after {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
}

.before, .after {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .before {
    transform: scale(1.05);
}

.portfolio-item:hover .after {
    transform: scale(1.05);
}

.ba-label {
    position: absolute;
    background-color: var(--accent);
    color: white;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 20px;
}

.before-label {
    top: 10px;
    left: 10px;
}

.after-label {
    top: 10px;
    right: 10px;
}

.portfolio-item h4 {
    font-size: 1.3rem;
    margin-top: 15px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* ===============================================
   PRODUCTS SECTION
   =============================================== */

.products {
    padding: var(--section-padding);
    background-color: var(--bg-secondary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow);
}

.product-image {
    height: 250px;
    overflow: hidden;
    background-color: var(--bg-tertiary);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-card h3 {
    padding: 20px 20px 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.price {
    padding: 0 20px;
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 700;
}

.product-card p:last-child {
    padding: 10px 20px 20px;
    color: var(--text-secondary);
}

.product-card.featured {
    grid-column: span 2;
}

.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--accent);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    z-index: 2;
}

/* ===============================================
   ABOUT SECTION
   =============================================== */

.about {
    padding: var(--section-padding);
    background-color: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 60px;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 30px;
}

.lead {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 25px;
    font-weight: 500;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===============================================
   CONTACT SECTION
   =============================================== */

.contact {
    padding: var(--section-padding);
    background-color: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 60px;
}

.contact-info {
    padding-right: 40px;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 24px;
    color: var(--accent);
    width: 30px;
}

.info-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.info-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.social-links a {
    width: 50px;
    height: 50px;
    background-color: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-primary);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-5px);
}

.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
}

.map-container iframe {
    filter: grayscale(0.5);
    transition: var(--transition);
}

[data-theme="dark"] .map-container iframe {
    filter: grayscale(1) invert(1);
}

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

.footer {
    background-color: var(--bg-tertiary);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo-placeholder {
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.footer ul li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer ul li a:hover {
    color: var(--accent);
}

.newsletter-form {
    display: flex;
    margin-top: 20px;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
}

.newsletter-form button {
    padding: 12px 30px;
    background-color: var(--accent);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: var(--accent-hover);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow);
        padding: 20px 0;
        border-top: 1px solid var(--border);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: clamp(2.5rem, 7vw, 4rem);
    }

    .title-line.accent {
        font-size: clamp(2.8rem, 8vw, 5rem);
    }

    .hero-image {
        display: none;
    }

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

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card.featured {
        grid-column: 1;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .stats {
        justify-content: space-around;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding-right: 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand .logo-placeholder {
        margin: 0 auto 20px;
    }

    .theme-toggle {
        top: 80px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .before-after {
        grid-template-columns: 1fr;
    }

    .before, .after {
        height: 200px;
    }

    .after-label {
        right: auto;
        left: 10px;
        top: auto;
        bottom: 10px;
    }
}