﻿/* 
 * AfroStylistsNetwork - Design System
 * Theme: Regal Crown / Black Beauty Magazine Inspired
 * Inspired by: Essence, Hype Hair, Pride Magazine
 */

/* --- Variables --- */
:root {
    /* Colors - Regal & Empowering */
    --color-bg: #FAF8F5;
    /* Warm cream */
    --color-surface: #FFFFFF;

    /* Increased Contrast Text Colors */
    --color-text-main: #0F0F1A;
    /* Darker Navy-Black for better readability */
    --color-text-muted: #3D3D4D;
    /* Darker grey */
    --color-text-light: #5C5C6E;

    /* Primary: Deep Plum */
    --color-primary: #6B2D5B;
    --color-primary-dark: #4A1F40;
    --color-primary-light: #F5EEF3;

    /* Accent: Warm Gold */
    --color-accent: #D4A855;
    --color-accent-hover: #C49A4A;
    --color-accent-dark: #A67C3D;

    /* Secondary */
    --color-coral: #E07B6C;
    --color-coral-dark: #C96B5D;

    --color-border: #E0DCD8;
    /* Slightly darker border */
    --color-line: rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(107, 45, 91, 0.1);
    --shadow-md: 0 4px 12px rgba(107, 45, 91, 0.12);
    --shadow-lg: 0 12px 24px rgba(107, 45, 91, 0.15);
    --shadow-hover: 0 20px 40px rgba(107, 45, 91, 0.18);
}

/* ... Reset & Base ... */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text-main);
}

/* === Buttons & Components === */

.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    font-family: var(--font-body);
}

.btn--primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn--gold {
    background: var(--color-accent);
    color: var(--color-text-main);
    border-color: var(--color-accent);
}

.btn--gold:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge--featured {
    background: var(--color-accent);
    color: var(--color-text-main);
    box-shadow: var(--shadow-sm);
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section */
.section {
    padding: 5rem 0;
}

/* Navbar */
.navbar {
    background: white;
    border-bottom: 1px solid var(--color-border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar__brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-main);
    text-decoration: none;
}

.navbar__brand span {
    color: var(--color-primary);
}

.navbar__menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar__link {
    color: var(--color-text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar__link:hover {
    color: var(--color-primary);
}

/* Hero Section with Enhanced Readability Overlay */
.hero {
    position: relative;
    padding: 8rem 0 10rem;
    background-color: #1a1a1a;
    color: white;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* ENHANCED: Stronger Gradient Overlay for Maximum Text Readability */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(15, 15, 26, 0.95) 0%,
            rgba(26, 26, 46, 0.85) 40%,
            rgba(107, 45, 91, 0.75) 70%,
            rgba(107, 45, 91, 0.6) 100%);
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero__title em {
    color: var(--color-accent);
    font-style: italic;
}

.hero__text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.98);
    margin-bottom: 2.5rem;
    max-width: 600px;
    font-weight: 500;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}

/* Cards (Salons) */
.salon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.salon-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.salon-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.salon-card--featured {
    border: 2px solid var(--color-accent);
    position: relative;
}

.salon-card__img-wrapper {
    position: relative;
    padding-top: 65%;
    overflow: hidden;
}

.salon-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    /* Focus on faces/hair at top of images */
}

.salon-card__body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.salon-card__title {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
}

.salon-card__location {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.salon-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    font-weight: 500;
}

.salon-card__actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Modern Breadcrumbs */
.breadcrumbs-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.breadcrumbs-modern a {
    text-decoration: none;
    color: #4B5563;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.breadcrumbs-modern a:hover {
    color: var(--color-primary);
}

.breadcrumbs-modern .separator {
    color: #D1D5DB;
    font-size: 1.2rem;
    line-height: 1;
    margin: 0 0.25rem;
}

.breadcrumbs-modern .current {
    background: #A67C6B;
    /* Muted brown/terracotta matches image */
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: #1C1917;
    color: rgba(255, 255, 255, 0.6);
    padding: 5rem 0 2rem;
    margin-top: 4rem;
}

.footer h4 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer a {
    color: inherit;
    text-decoration: none !important;
}

.footer a:hover {
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Blog Cards - Face-focused image styling */
.blog-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center 20%;
    /* Focus on faces/hair */
    display: block;
}

.blog-card__body {
    padding: 1.25rem;
}

.blog-card__title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
    font-family: var(--font-display);
}

.blog-card__meta {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 500;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Mobile Nav */
.mobile-toggle {
    display: none;
}

/* Footer Lists */
.footer ul {
    list-style: none;
    padding: 0;
}

.footer li {
    margin-bottom: 0.75rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .salon-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar__menu {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero {
        padding: 4rem 0 5rem;
    }

    .section {
        padding: 3rem 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .salon-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }

    .hero__text {
        font-size: 1rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .salon-card__actions {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   STICKY DUAL CTA - Mobile UX (ALL PAGES)
   ======================================== */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    z-index: 9999;
    display: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
    border-top: 1px solid rgba(212, 168, 85, 0.3);
}

.sticky-cta__dual {
    display: flex;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
}

.sticky-cta__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #D4A855 0%, #C49545 100%);
    color: #1A1A2E;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    min-height: 48px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 168, 85, 0.4);
}

.sticky-cta__btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sticky-cta__btn:hover,
.sticky-cta__btn:active {
    background: linear-gradient(135deg, #E4B865 0%, #D4A855 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(212, 168, 85, 0.5);
}

@media (max-width: 768px) {
    .sticky-cta {
        display: block !important;
    }

    body {
        padding-bottom: 85px;
    }
}

@media (min-width: 769px) {
    .sticky-cta {
        display: none !important;
    }
}

/* Mobile Menu Dropdown */
.navbar__menu.is-open {
    display: flex !important;
}

@media (max-width: 768px) {
    .navbar__menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 4px 12px rgba(107, 45, 91, 0.12);
        border-top: 1px solid #E0DCD8;
        gap: 0;
        z-index: 99;
    }

    .navbar__menu .navbar__link {
        padding: 1rem 2rem;
        border-bottom: 1px solid #E0DCD8;
        text-align: center;
        display: block;
    }

    .navbar__menu .navbar__link:last-child {
        border-bottom: none;
    }

    .navbar {
        position: relative;
    }

    /* Mobile breadcrumbs - prevent text wrap */
    .breadcrumbs-modern {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
        gap: 0.25rem !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        max-width: 100%;
    }

    .breadcrumbs-modern a,
    .breadcrumbs-modern span {
        white-space: nowrap !important;
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    .breadcrumbs-modern .current {
        padding: 0.25rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
}

/* ========================================
   CROSS-BROWSER MOBILE FIXES
   Safari, Chrome, Samsung, Opera, iOS
   ======================================== */

/* Force consistent colors across all browsers */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    color-scheme: light;
}

/* Webkit/Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .sticky-cta {
        position: fixed !important;
        position: -webkit-sticky !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Hero badge mobile fix - prevent overflow */
@media (max-width: 768px) {

    .hero .badge,
    .badge--verified {
        max-width: calc(100vw - 4rem) !important;
        font-size: 0.7rem !important;
        padding: 0.4rem 0.8rem !important;
        white-space: normal !important;
        text-align: center !important;
        line-height: 1.4 !important;
    }

    .hero__title {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }

    .hero__text {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }

    .container {
        padding: 0 1rem !important;
    }
}

/* Mobile menu - cross-browser touch support */
.mobile-toggle {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Sticky CTA - force visibility on ALL mobile browsers */
@media (max-width: 768px) {
    .sticky-cta {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99999 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        transform: translate3d(0, 0, 0) !important;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    body {
        padding-bottom: 90px !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* Mobile menu dropdown - cross-browser */
@media (max-width: 768px) {
    .navbar__menu.is-open {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        -webkit-transform: translateY(0) !important;
        transform: translateY(0) !important;
    }

    .navbar {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
    }
}

/* Samsung Browser / Android Chrome fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (max-width: 768px) {
    .sticky-cta__btn {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
}

/* iOS Safari safe area padding - Mobile only */
@media (max-width: 768px) {
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .sticky-cta {
            padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)) !important;
        }

        body {
            padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important;
        }
    }
}

/* ========================================
   SALON PHONE DISPLAY
   ======================================== */
.salon-card__phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

.salon-card__phone a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #D4A855 0%, #C9973E 100%);
    color: #1A1A2E;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(212, 168, 85, 0.3);
}

.salon-card__phone a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 168, 85, 0.4);
}

.salon-card__phone svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .salon-card__phone a {
        font-size: 0.85rem;
        padding: 0.5rem 0.9rem;
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 9998;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.whatsapp-float__tooltip {
    position: absolute;
    right: 70px;
    background: #1A1A2E;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.whatsapp-float:hover .whatsapp-float__tooltip {
    opacity: 1;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 100px;
        right: 15px;
        width: 55px;
        height: 55px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    .whatsapp-float__tooltip {
        display: none;
    }
}