/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #121212;
    font-size: 16px;
    overflow-x: hidden;
}

/* ==========================================================================
   Typography & Basic Elements
   ========================================================================== */

h1, h2, h3, h4 {
    margin-bottom: 0.8em;
    line-height: 1.3;
    color: #ffffff;
    font-weight: 600;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; text-align: center; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

p {
    margin-bottom: 1rem;
    color: #b0b0b0;
}

p.subtitle {
    font-size: 1.2rem;
    color: #c0c0c0;
}

p.small-text {
    font-size: 0.9rem;
    color: #888;
    margin-top: 1rem;
    margin-bottom: 0;
}


a {
    color: #2ecc71;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #58d68d;
    text-decoration: underline;
}

ul {
    list-style: none;
}

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

/* ==========================================================================
   Layout & Helpers
   ========================================================================== */

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

section {
    padding: 60px 0;
    overflow: hidden;
}

.bg-alt {
    background-color: #1f1f1f;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

header {
    background-color: #1f1f1f;
    padding: 1rem 0;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

header nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 1.6rem; /* This will no longer apply to the logo as it’s an SVG now */
    font-weight: bold; /* This can be removed too */
    color: #ffffff; /* SVG will inherit the color, so no need to set this */
    height: 24px;  /* Adjust the height to match other content */
    width: auto; 
}
header .logo img {
    height: 36px;  /* Adjust the height to match other content */
    width: auto;   /* Ensure the width is scaled proportionally */
}

header .logo a {
    color: inherit; /* Removes text color inheritance */
    text-decoration: none; /* Removes text underline */
}

header .logo a:hover {
    text-decoration: none; /* No hover effect anymore */
    color: inherit; /* Ensures the color stays the same when hovered */
}


header nav ul {
    display: flex;
    align-items: center;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    color: #cccccc;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

header nav ul li a:hover {
    color: #2ecc71;
    text-decoration: none;
}

/* ==========================================================================
   Hero Section (#hero)
   ========================================================================== */

#hero {
    background-color: #1a1a1a;
    padding: 80px 0;
}

#hero .hero-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: center;
    gap: 40px;
}

#hero .hero-text {
    text-align: left;
}

#hero .hero-text h1 {
    font-size: 3rem;
    margin-bottom: 0.6em;
}

#hero .hero-text .subtitle {
    font-size: 1.3rem;
    margin-bottom: 1.8rem;
}

#hero .hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

#hero .hero-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#hero .cta-button {
    display: inline-block;
    background-color: #27ae60;
    color: #ffffff;
    padding: 14px 35px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
}

#hero .cta-button:hover {
    background-color: #2ecc71;
    text-decoration: none;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==========================================================================
   Features Section (#features)
   ========================================================================== */

#features {
    background-color: #121212;
}

#features h2 {
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-item {
    background-color: #1f1f1f;
    padding: 30px 25px;
    border-radius: 8px;
    border: 1px solid #333;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.1);
}


.feature-item .icon {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    color: #2ecc71;
    font-weight: bold;
    line-height: 1;
}

.feature-item h3 {
    margin-bottom: 0.6rem;
    color: #ffffff;
}

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

/* ==========================================================================
   Join as Barber Section (#join-barber)
   ========================================================================== */

#join-barber {
     padding: 80px 0;
}

#join-barber .join-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: center;
    gap: 50px;
}

#join-barber .join-text {
    text-align: left;
}

#join-barber .join-text h2 {
    text-align: left;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

#join-barber .join-text p {
    font-size: 1.1rem;
    color: #c0c0c0;
    margin-bottom: 1.5rem;
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366;
    color: #ffffff;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 25px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
}

.whatsapp-button:hover {
    background-color: #1DAE54;
    color: #ffffff;
    text-decoration: none;
    transform: scale(1.03);
}

#join-barber .join-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

#join-barber .join-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: none;
}


/* ==========================================================================
   Gallery Section (#gallery)
   ========================================================================== */

#gallery {
    padding: 60px 0 0 0;
    background-color: #121212;
}

#gallery .container:first-of-type {
    margin-bottom: 2rem;
}
#gallery .container:last-of-type {
    padding-top: 2rem;
    padding-bottom: 60px;
}


@keyframes scrollGallery {
  0% { transform: translateX(0); }
  /* Translate by the width of the first set: 6 * (400px item + 20px margin) = 2520px */
  100% { transform: translateX(-2520px); }
}

.gallery-scroll-container {
    padding: 10px 0 20px 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.gallery-grid {
    display: flex;
    /* Calculate total width: (item-width + margin) * total-items */
    width: calc((400px + 20px) * 12);
    /* Animation */
    animation: scrollGallery 40s linear infinite;
    will-change: transform;
}

.gallery-scroll-container:hover .gallery-grid {
    animation-play-state: paused;
}


.gallery-item {
    flex-shrink: 0;
    width: 400px;
    height: 300px;
    margin-right: 20px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #333;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
     transform: scale(1.05);
}

#gallery .gallery-note {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

/* ==========================================================================
   Call to Action Section (#cta)
   ========================================================================== */

#cta {
     text-align: center;
}

#cta .cta-content {
    max-width: 700px;
    margin: 0 auto;
}

#cta h2 {
    margin-bottom: 0.8em;
    color: #ffffff;
}

#cta p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #b0b0b0;
}

.download-buttons {
     margin-bottom: 1rem;
}

.download-buttons a.store-button {
    margin: 5px 10px;
    display: inline-block;
    background-color: #444;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    min-width: 150px;
}

.download-buttons a.store-button:hover {
    background-color: #555;
    text-decoration: none;
    color: #ffffff;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background-color: #1f1f1f;
    color: #aaaaaa;
    padding: 40px 0;
    text-align: center;
    margin-top: 0;
    border-top: 1px solid #333;
}

footer p {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

footer ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

footer ul li {
    margin: 5px 15px;
}

footer ul li a {
    color: #bbbbbb;
    font-size: 0.9rem;
}

footer ul li a:hover {
    color: #2ecc71;
    text-decoration: underline;
}

/* ==========================================================================
   Legal Content Styling (Terms & Privacy)
   ========================================================================== */

.legal-content {
    padding-top: 40px;
    padding-bottom: 60px;
    background-color: #1a1a1a;
}

.legal-content .container {
    max-width: 800px;
}

.legal-content h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #ffffff;
}
.legal-content h2 {
    text-align: left;
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
    color: #eeeeee;
}
.legal-content h3 {
    text-align: left;
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: #e0e0e0;
    font-weight: 600;
}
.legal-content h4 {
    text-align: left;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    color: #d0d0d0;
    font-weight: bold;
}

.legal-content p,
.legal-content li {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #b0b0b0;
}
.legal-content ul {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 1.5rem;
}
.legal-content strong {
    color: #e0e0e0;
    font-weight: 600;
}
.legal-content p > strong:first-child {
    display: block;
    margin-bottom: 0.2em;
}

/* ==========================================================================
   Responsive Design (Media Queries)
   ========================================================================== */

@media (max-width: 992px) {
    .container { max-width: 960px; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    #hero .hero-text h1 { font-size: 2.6rem; }
    #hero .hero-text .subtitle { font-size: 1.2rem; }

    #join-barber .join-content-grid { gap: 30px; }
    #join-barber .join-text h2 { font-size: 2rem; }

    .gallery-item { width: 350px; height: 260px; margin-right: 15px; }
    /* Recalculate animation offset: 6 * (350 + 15) = 2190px */
    @keyframes scrollGallery { 100% { transform: translateX(-2190px); } }
    .gallery-grid { width: calc((350px + 15px) * 12); }
}


@media (max-width: 768px) {
    body { font-size: 15px; }
    section { padding: 50px 0; }
    #gallery { padding: 50px 0 0 0; }
    #gallery .container:last-of-type { padding-bottom: 50px; }

    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.3rem; }

    header nav.container { flex-direction: column; align-items: center; }
    header .logo { margin-bottom: 15px; }
    header nav ul { margin-top: 0; padding-left: 0; justify-content: center; flex-wrap: wrap; }
    header nav ul li { margin: 5px 10px; }

    #hero { padding: 60px 0; }
    #hero .hero-content-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    #hero .hero-text { order: 2; text-align: center; }
    #hero .hero-text h1 { font-size: 2.4rem; }
    #hero .hero-text .subtitle { font-size: 1.1rem; margin: 0 auto 1.5rem auto; max-width: 90%; }
    #hero .hero-image-container { order: 1; max-width: 85%; margin: 0 auto; box-shadow: none !important; filter: none !important; border: none !important;}
    #hero .cta-button { padding: 12px 30px; font-size: 1rem; }

    .features-grid { grid-template-columns: 1fr; gap: 25px; }

    #join-barber { padding: 60px 0; }
    #join-barber .join-content-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    #join-barber .join-text { order: 2; text-align: center; }
    #join-barber .join-text h2 { text-align: center; font-size: 1.9rem;}
    #join-barber .join-text p { font-size: 1.05rem; }
    #join-barber .join-image-container { order: 1; max-width: 85%; margin: 0 auto; }

    .gallery-item { width: 300px; height: 220px; margin-right: 15px; }
     /* Recalculate animation offset: 6 * (300 + 15) = 1890px */
     @keyframes scrollGallery { 100% { transform: translateX(-1890px); } }
    .gallery-grid { width: calc((300px + 15px) * 12); animation-duration: 35s; }

    .download-buttons { display: flex; flex-direction: column; align-items: center; }
    .download-buttons a.store-button { margin: 8px 0; width: 70%; max-width: 250px; padding: 12px 20px; }

    footer ul li { margin: 5px 10px; }

    .legal-content h1 { font-size: 2rem; }
    .legal-content h2 { font-size: 1.4rem; }
    .legal-content h3 { font-size: 1.2rem; }
    .legal-content h4 { font-size: 1.0rem; }
    .legal-content .container { max-width: 90%; }
    .legal-content ul { margin-left: 20px; }
}

@media (max-width: 480px) {
    body { font-size: 14px; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
    #hero .hero-text h1 { font-size: 2rem; }
    #hero .hero-text .subtitle { font-size: 1rem; }
    #hero .cta-button { width: 80%; max-width: 280px;}

    #join-barber .join-text h2 { font-size: 1.7rem; }

    .gallery-item { width: 260px; height: 190px; margin-right: 10px; }
      /* Recalculate animation offset: 6 * (260 + 10) = 1620px */
      @keyframes scrollGallery { 100% { transform: translateX(-1620px); } }
    .gallery-grid { width: calc((260px + 10px) * 12); animation-duration: 30s; }
}