/* --- Global Styles & Variables --- */
:root {
    --primary-color: #FF6B6B; /* A vibrant red for accents, like a barber pole */
    --secondary-color: #4CAF50; /* A contrasting green for success/positive actions */
    --dark-bg: #1A1A1A;
    --dark-text: #E0E0E0;
    --light-bg: #F8F8F8;
    --light-text: #333333;
    --grey-border: #444;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    background: var(--dark-bg);
    color: var(--dark-text);
}

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

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

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }

p {
    margin-bottom: 1rem;
}

.section-dark {
    background: var(--dark-bg);
    color: var(--dark-text);
    padding: 60px 0;
    text-align: center;
}

.section-light {
    background: var(--light-bg);
    color: var(--light-text);
    padding: 60px 0;
    text-align: center;
}

.section-dark.section-divider {
    border-top: 1px solid var(--grey-border);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #bbb;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--light-bg);
}

.btn-primary:hover {
    background: #FF4A4A;
}

.btn-secondary {
    background: none;
    color: var(--dark-text);
    border: 2px solid var(--grey-border);
    padding: 0.7rem 1.8rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-dark {
    background: var(--dark-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-dark:hover {
    background: var(--primary-color);
    color: var(--light-bg);
}

/* --- Navigation Bar --- */
#navbar {
    background: rgba(26, 26, 26, 0.95); /* Semi-transparent dark background */
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#navbar.scrolled {
    background: var(--dark-bg); /* Solid dark when scrolled */
    box-shadow: 0 6px 15px rgba(0,0,0,0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

nav .logo i {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 2.5rem;
}

nav ul li a {
    color: var(--dark-text);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Specific styling for nav buttons */
nav ul li .btn {
    margin-left: 1rem;
}
nav ul li .btn-secondary {
    border-color: var(--grey-border);
    color: var(--dark-text);
}
nav ul li .btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-bg);
    overflow: hidden;
    background: url('https://images.unsplash.com/photo-1555554371-d64e9a656885?q=80&w=2070') no-repeat center center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Darker overlay for text readability */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    font-weight: 300;
    color: #ccc;
}

.search-bar {
    display: flex;
    justify-content: center;
    max-width: 650px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.search-bar input {
    flex-grow: 1;
    padding: 1.2rem 1.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: var(--light-text);
    font-size: 1.1rem;
    outline: none;
}

.search-bar input::placeholder {
    color: #888;
}

.search-bar button {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    border-radius: 0; /* Remove default border-radius */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- How It Works Section (Customer) --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    /* Add this line below */
    perspective: 1000px; /* Adds 3D perspective to the container */
}


.flip-card {
    background-color: transparent;
    width: 100%;
    height: 300px; /* Set a fixed height for the cards */
    border: none;
}

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

/* This is the main flip effect on hover */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
    cursor: pointer;
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    
    /* Re-applying original card styling here */
    background: #282828;
    color: var(--dark-text);
    padding: 2.5rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Style the front face (content is from your original card) */
.flip-card-front i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.flip-card-front h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--light-bg);
}

.flip-card-front p {
    font-size: 0.95rem;
    color: #bbb;
}

/* Style the back face */
.flip-card-back {
    transform: rotateY(180deg);
}

.flip-card-back h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
}

.flip-card-back p {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 1.5rem;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Add margin-top utility class if you don't have one */
.mt-4 {
    margin-top: 4rem;
}

.step-card i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.step-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--light-bg);
}

.step-card p {
    font-size: 0.95rem;
    color: #bbb;
}

/* --- For Barbers Section --- */
.barber-promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 50px;
    align-items: center;
    text-align: left;
    margin-top: 3rem;
}

.barber-promo-content h2 {
    color: var(--light-text);
    font-size: 2.8rem;
}

.barber-promo-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.barber-promo-content ul {
    list-style: none;
    margin-bottom: 2rem;
}

.barber-promo-content ul li {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--light-text);
}

.barber-promo-content ul li i {
    color: var(--secondary-color);
    margin-right: 1rem;
    font-size: 1.2rem;
}

.barber-promo-image {
    max-width: 100%;
}
.barber-promo-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.feature-item {
    background: #282828;
    padding: 2.5rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: center;
    color: var(--dark-text);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.feature-item h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--light-bg);
}

.feature-item p {
    font-size: 0.95rem;
    color: #bbb;
}

/* --- Footer --- */
footer {
    background: #111; /* Even darker footer */
    color: #aaa;
    padding: 4rem 0 2rem;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: left;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--light-bg);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.footer-col h3 i {
    color: var(--primary-color);
    margin-right: 0.7rem;
    font-size: 1.2rem;
}

.footer-col p {
    color: #888;
    line-height: 1.8;
}

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

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: #888;
    transition: color 0.3s ease;
}

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

.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    color: #888;
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--grey-border);
    padding-top: 2rem;
    margin-top: 2rem;
    color: #666;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    nav ul {
        display: none; /* Hide for smaller screens, will implement mobile menu later */
    }
    nav {
        justify-content: center; /* Center logo when menu is hidden */
    }
    .barber-promo-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .barber-promo-content {
        order: 2; /* Put text below image on mobile */
    }
    .barber-promo-image {
        order: 1;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .section-dark, .section-light {
        padding: 40px 0;
    }

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

    .search-bar {
        flex-direction: column;
        width: 90%;
    }
    .search-bar input {
        border-radius: 8px 8px 0 0;
        margin-bottom: 0.5rem;
        padding: 1rem;
    }
    .search-bar button {
        border-radius: 0 0 8px 8px;
        padding: 1rem;
    }

    .steps-grid, .features-grid, .footer-grid {
        grid-template-columns: 1fr;
    }
    .step-card, .feature-item {
        margin-bottom: 1.5rem;
    }

    .footer-grid {
        text-align: center;
    }
    .footer-col h3 {
        justify-content: center;
    }
}