/* ============================================
   InsideStaffordshire - Master Stylesheet
   Version: 2.0
   Brand Colors: #20c997 (teal), #222 (black)
   ============================================ */

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* ==================== UNIVERSAL HEADER ==================== */
.universal-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--module-color, #20c997);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Brand/Logo */
.brand-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-weight: 700;
}

.brand-primary {
    color: #222;
    font-size: 20px;
    line-height: 1;
}

.brand-module {
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-module-item {
    position: relative;
}

.nav-module-link {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 12px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-module-link:hover {
    color: #222;
}

.nav-module-link.active {
    color: #222;
}

/* Dropdown Menu */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1001;
    overflow: hidden;
}

.nav-module-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    top: calc(100% + 5px);
}

/* Dropdown Links Section */
.nav-links-section {
    padding: 15px 0;
}

.nav-dropdown-link {
    display: block;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-dropdown-link:hover {
    background: #f8f9fa;
    color: #222;
    padding-left: 25px;
}

/* Stats Panel in Dropdown */
.stats-panel {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 2px solid;
}

.stats-panel h4 {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.stat-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.stat-number {
    font-weight: 700;
    color: #222;
    min-width: 35px;
}

.stat-label {
    color: #666;
    flex: 1;
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: #222;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger:hover span {
    background: var(--module-color, #20c997);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: absolute;
    right: 0;
    top: 0;
    width: 320px;
    max-width: 90%;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s;
    overflow-y: auto;
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    background: #f8f9fa;
}

.mobile-nav-header h2 {
    font-size: 20px;
    color: #222;
}

.close-nav {
    background: none;
    border: none;
    font-size: 36px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
}

.close-nav:hover {
    background: #e9ecef;
    color: #222;
}

.mobile-nav-body {
    padding: 20px;
}

.mobile-nav-section {
    margin-bottom: 30px;
}

.mobile-nav-module {
    border-left: 4px solid;
    padding-left: 15px;
    margin-bottom: 12px;
}

.mobile-nav-module h3 {
    font-size: 18px;
    font-weight: 700;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin-left: 19px;
}

.mobile-nav-links li {
    margin-bottom: 8px;
}

.mobile-nav-links a {
    text-decoration: none;
    color: #555;
    font-size: 15px;
    display: block;
    padding: 8px 0;
    transition: color 0.3s;
}

.mobile-nav-links a:hover {
    color: #222;
}

/* Mobile Stats Panel */
.mobile-stats-panel {
    margin: 15px 0 0 19px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mobile-stats-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.mobile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

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

.mobile-stat-number {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.mobile-stat-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ==================== UNIVERSAL FOOTER ==================== */
.universal-footer {
    background: #222;
    color: #aaa;
    padding: 60px 20px 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-tagline {
    font-size: 14px;
    line-height: 1.6;
    color: #999;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 30px;
}

.footer-bottom-content {
    text-align: center;
}

.copyright {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.footer-tagline-small {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ==================== HOMEPAGE STYLES ==================== */
.hero-home {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    color: #20c997;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.search-box-large {
    max-width: 900px;
    margin: 0 auto 40px;
}

.search-form {
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.search-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    font-size: 18px;
    color: #999;
}

.search-input,
.search-select {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus,
.search-select:focus {
    outline: none;
    border-color: #20c997;
}

.btn-search {
    padding: 15px 40px;
    background: #20c997;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-search:hover {
    background: #1ba57a;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

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

.hero-stat-number {
    font-size: 36px;
    font-weight: 800;
    display: block;
    margin-bottom: 5px;
}

.hero-stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* Categories Section */
.categories-section {
    padding: 80px 20px;
    background: white;
}

.section-header-home {
    text-align: center;
    margin-bottom: 60px;
}

.section-header-home h2 {
    font-size: 36px;
    color: #222;
    margin-bottom: 10px;
}

.section-header-home p {
    font-size: 18px;
    color: #666;
}

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

.category-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    position: relative;
}

.category-card:hover {
    border-color: #20c997;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #222;
}

.category-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.category-arrow {
    position: absolute;
    right: 30px;
    bottom: 30px;
    font-size: 24px;
    color: #20c997;
    opacity: 0;
    transition: opacity 0.3s;
}

.category-card:hover .category-arrow {
    opacity: 1;
}

/* Featured Businesses Section */
.featured-section {
    padding: 80px 20px;
    background: #f8f9fa;
}

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

.business-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.business-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.business-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.business-name {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.verified-badge {
    background: #20c997;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.business-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.business-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 6px;
}

.btn-view-business {
    display: inline-block;
    padding: 12px 24px;
    background: #20c997;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-view-business:hover {
    background: #1ba57a;
    transform: translateX(5px);
}

.btn-browse-all {
    display: inline-block;
    padding: 15px 40px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    margin: 0 auto;
    text-align: center;
}

.btn-browse-all:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* How It Works Section */
.steps-section {
    padding: 80px 20px;
    background: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

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

.step-number {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    line-height: 60px;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
}

.step-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #222;
}

.step-item p {
    font-size: 14px;
    color: #666;
}

/* Business CTA Section */
.business-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-benefits {
    list-style: none;
    margin: 30px 0;
    text-align: left;
    display: inline-block;
}

.cta-benefits li {
    padding: 10px 0;
    font-size: 16px;
}

.cta-benefits li::before {
    content: "✓";
    color: #20c997;
    font-weight: 800;
    margin-right: 10px;
}

.price-display {
    font-size: 48px;
    font-weight: 800;
    margin: 20px 0;
}

.btn-cta-large {
    display: inline-block;
    padding: 20px 50px;
    background: #20c997;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-cta-large:hover {
    background: #1ba57a;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .brand-link {
        font-size: 16px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .search-inputs {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .business-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ==================== USER ACCOUNT NAVIGATION ==================== */
.user-account-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 20px;
}

/* Login/Register Buttons */
.btn-login,
.btn-register {
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-login {
    color: #333;
    border: 2px solid #e0e0e0;
    background: white;
}

.btn-login:hover {
    border-color: #20c997;
    color: #20c997;
}

.btn-register {
    background: #20c997;
    color: white;
    border: 2px solid #20c997;
}

.btn-register:hover {
    background: #19a078;
    border-color: #19a078;
    transform: translateY(-1px);
}

/* User Dropdown */
.user-dropdown-wrapper {
    position: relative;
}

.user-account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.user-account-btn:hover {
    border-color: #20c997;
}

.user-icon {
    font-size: 18px;
}

.user-name-text {
    color: #333;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 10px;
    color: #999;
    transition: transform 0.3s;
}

.user-dropdown-wrapper:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.user-dropdown-wrapper:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.user-dropdown-link:hover {
    background: #f8f9fa;
}

.user-dropdown-link:first-child {
    border-radius: 8px 8px 0 0;
}

.user-dropdown-link:last-child {
    border-radius: 0 0 8px 8px;
}

.user-dropdown-link span {
    font-size: 16px;
}

.user-dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 4px 0;
}

.logout-link {
    color: #e74c3c;
}

.logout-link:hover {
    background: #fee;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .user-account-nav {
        display: none; /* Hide in mobile, show in hamburger menu */
    }
}
