/*
Theme Name: BlackandWhiteFarms
Theme URI: https://www.blackandwhitefarms.co.za
Author: Henry Oosthuizen
Author URI: https://henrygo.co.za
Description: Custom WordPress theme for Black & White Farms — one-page landing 
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: bwf
*/

/* Theme Name: BlackAndWhiteFarms Redesign */

/* Prevent global horizontal scroll */
html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Make sure all elements respect width */
* {
    box-sizing: border-box;
    max-width: 100%;
}

body {
    font-family: Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

/* Logo Size */
.logo img {
    max-height: 60px;
    width: auto;
}

/* Header contact */
.header-contact {
    margin-left: 20px;
    font-size: 1rem;
    font-weight: bold;
    margin-right: 20px;
}

.header-contact a {
    color: #2d2d2d;
    text-decoration: none;
    transition: color 0.3s;
}

.header-contact a:hover {
    color: #00796B;
}

/* Mobile styles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .nav-menu {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .header-contact {
        margin-top: 10px;
    }

    .logo img {
        max-width: 120px; /* shrink logo on mobile */
    }
}

/* Sticky Header */
.top-header {
    position: sticky;
    top: 12px;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 999;
    max-height: 999px;
   /* margin-top: 80px; */
}


/* Base header layout */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 10px 220px 10px 40px;
    flex-wrap: nowrap;
}

.site-header .logo h1 {
    font-size: 1.8rem;
    color: #2d2d2d;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

/* Wiggle Animation */
@keyframes wiggle {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(-5deg); }
  30% { transform: rotate(5deg); }
  45% { transform: rotate(-3deg); }
  60% { transform: rotate(3deg); }
  75% { transform: rotate(-2deg); }
  100% { transform: rotate(0deg); }
}

.nav-menu a {
    display: inline-block;
    text-decoration: none;
    color: #2d2d2d;
    font-weight: bold;
    transition: color 0.3s;
}

.nav-menu a:hover {
    animation: wiggle 0.6s ease;
    color: #00796B;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background: #f8f6f0; /* cream */
        padding: 15px 0;
        margin-top: 10px;
    }

    .nav-menu.active {
        display: flex;
    }

    .header-contact {
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }

    .logo img {
        max-width: 120px;
    }
}

/* Desktop keeps phone number */
.desktop-contact {
    display: block;
}

/* Mobile hides desktop number, shows it inside menu */
.mobile-contact {
    display: none;
}

@media (max-width: 768px) {
    .desktop-contact {
        display: none;
    }
    .mobile-contact {
        display: block;
        margin-top: 15px;
    }
}

/* Hero Section */
.hero {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 0 20px;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45); /* adjust darkness */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* ensures text sits above overlay */
}

.hero-content h1,
.hero-content p {
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

.hero-content h1 {
    font-size: 2.4rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.cta-btn {
    display: inline-block;
    padding: 14px 28px;
    background: #00796B;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background 0.3s;
}

.cta-btn:hover {
    background: #2C2C2C;
    color: white;
}

*Lets start with the cloud formation rather*/

/*The container will also serve as the SKY*/

*{ margin: 0; padding: 0;}

body {
	/*To hide the horizontal scroller appearing during the animation*/
	overflow: hidden;
}

#clouds{
	padding-bottom: 0;
    padding-top: 100px;
	background: #c9dbe9;
	background: -webkit-linear-gradient(top, #c9dbe9 0%, #fff 100%);
	background: -linear-gradient(top, #c9dbe9 0%, #fff 100%);
	background: -moz-linear-gradient(top, #c9dbe9 0%, #fff 100%);
}

/*Time to finalise the cloud shape*/
.cloud {
	width: 200px; height: 60px;
	background: #fff;
	border-radius: 200px;
	-moz-border-radius: 200px;
	-webkit-border-radius: 200px;
	position: relative; 
}

.cloud:before, .cloud:after {
	content: '';
	position: absolute; 
	background: #fff;
	width: 100px; height: 80px;
	position: absolute; top: -15px; left: 10px;
	
	border-radius: 100px;
	-moz-border-radius: 100px;
	-webkit-border-radius: 100px;
	
	-webkit-transform: rotate(30deg);
	transform: rotate(30deg);
	-moz-transform: rotate(30deg);
}

.cloud:after {
	width: 120px; height: 120px;
	top: -55px; left: auto; right: 15px;
}

/*Time to animate*/
.x1 {
	-webkit-animation: moveclouds 15s linear infinite;
	-moz-animation: moveclouds 15s linear infinite;
	-o-animation: moveclouds 15s linear infinite;
}

/*variable speed, opacity, and position of clouds for realistic effect*/
.x2 {
	left: 200px;
	
	-webkit-transform: scale(0.6);
	-moz-transform: scale(0.6);
	transform: scale(0.6);
	opacity: 0.6; /*opacity proportional to the size*/
	
	/*Speed will also be proportional to the size and opacity*/
	/*More the speed. Less the time in 's' = seconds*/
	-webkit-animation: moveclouds 25s linear infinite;
	-moz-animation: moveclouds 25s linear infinite;
	-o-animation: moveclouds 25s linear infinite;
}

.x3 {
	left: -250px; top: -200px;
	
	-webkit-transform: scale(0.8);
	-moz-transform: scale(0.8);
	transform: scale(0.8);
	opacity: 0.8; /*opacity proportional to the size*/
	
	-webkit-animation: moveclouds 20s linear infinite;
	-moz-animation: moveclouds 20s linear infinite;
	-o-animation: moveclouds 20s linear infinite;
}

.x4 {
	left: 470px; top: -250px;
	
	-webkit-transform: scale(0.75);
	-moz-transform: scale(0.75);
	transform: scale(0.75);
	opacity: 0.75; /*opacity proportional to the size*/
	
	-webkit-animation: moveclouds 18s linear infinite;
	-moz-animation: moveclouds 18s linear infinite;
	-o-animation: moveclouds 18s linear infinite;
}

.x5 {
	left: -150px; top: -150px;
	
	-webkit-transform: scale(0.8);
	-moz-transform: scale(0.8);
	transform: scale(0.8);
	opacity: 0.8; /*opacity proportional to the size*/
	
	-webkit-animation: moveclouds 20s linear infinite;
	-moz-animation: moveclouds 20s linear infinite;
	-o-animation: moveclouds 20s linear infinite;
}

@-webkit-keyframes moveclouds {
	0% {margin-left: 1000px;}
	100% {margin-left: -1000px;}
}
@-moz-keyframes moveclouds {
	0% {margin-left: 1000px;}
	100% {margin-left: -1000px;}
}
@-o-keyframes moveclouds {
	0% {margin-left: 1000px;}
	100% {margin-left: -1000px;}
}

/* BULK MESSAGE FLOATING */
.bulk-message {
    position: relative; 
    margin: 20px auto 50px auto; /* space above and below */
    display: inline-block;
    background: white; 
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 500;
    color: #000000;
    white-space: nowrap;
    animation: floatMessage 25s linear infinite;
}

/* Center the message on the page */
.bulk-message {
    left: 0;
    right: 0;
}

/* Links inside the message */
.bulk-message a {
    color: #00796B;
    text-decoration: underline;
}

.bulk-background{
 background-color: white;
 text-align: center;
 align-items: center;
}

/* Extra text above the button */
.bulk-extra-text {
    margin-top: 18px;
    font-size: 1.1rem;
    font-style: italic;
    color: #080808;
}

/* MANGO THEME BULK BUTTON */
.bulk-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 24px;
    background-color: #f4a300;     /* ripe mango orange */
    color: #ffffff !important;                /* white text */
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 30px;
    border: 2px solid #ffd266;     /* soft mango yellow border */
    transition: all 0.25s ease-in-out;
}

/* Hover effect */
.bulk-btn:hover {
    background-color: #ffb733;     /* brighter mango gold */
    color: #ffffff;
    border-color: #ffb733;
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(255, 183, 51, 0.5);
}



.arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #ffffff; /* arrow color = white */
    margin-right: 10px;
}


/* Animation keyframes (float left to right) 
@keyframes floatMessage {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100vw); }
}
*/

/* About Section */
.about {
  padding: 60px 10%;
  background: #F5EBDD;
}

.about-container {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 1100px;
  margin: auto;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
  min-width: 280px;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #222;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
}

.about-image {
  flex: 1;
  min-width: 280px;
}

.about-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.about-bullets {
    display:block;
    gap: 20px; /* spacing between items */
    list-style-type: disc; /* keeps bullet points */
    padding-left: 20px; /* ensures bullets don’t touch edge */
}

.about-bullets li {
    font-size: 1rem;
    color: #444;
}

/* Featured Products */

.products {
    padding: 20px 10% 20px 10%;
    background: #fff;
    text-align: center;
}

.products h2 {
    font-size: 2rem;
    margin-bottom: 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.product-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
    text-align: left;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #222;
}

.product-info .category {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 10px;
}

.product-info .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: black;
    margin-bottom: 15px;
}

.view-product {
    display: inline-block;
    padding: 10px 18px;
    background: #00796B;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background 0.3s;
}

.view-product:hover {
    background: #00796B;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Categories Section */
.categories {
    padding: 60px 10%;
    background: #f8f8f8;
    text-align: center;
}

.categories h2 {
    font-size: 2rem;
    margin-bottom: 40px;
}

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

.category-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.category-card a {
    text-decoration: none; /* remove blue underline */
    color: inherit; /* inherit text color */
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-card h3 {
    padding: 15px;
    margin: 0;
    font-size: 1.3rem;
    color: #222;
    background: #fff;
    position: relative;
}

/* Add teal underline */
.category-card h3::after {
    content: "";
    display: block;
    width: 40px;   /* adjust length */
    height: 3px;   /* thickness */
    background: #008080; /* teal */
    margin: 8px auto 0;
    border-radius: 2px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Testimonials Section */
.testimonials {
    padding: 60px 10%;
    background: #F5EBDD;
    text-align: center;
}

.testimonials h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #222;
}

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

.testimonial-card {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.testimonial-card .quote {
    font-size: 1.1rem;
    font-style: italic;
    color: #444;
    margin-bottom: 15px;
}

.testimonial-card .author {
    font-weight: bold;
    color: black;
}

/* Contact & Location Section */
.contact-section {
    padding: 60px 10%;
    background: #f8f8f8;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: auto;
}

.contact-info, 
.contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-info h2,
.contact-form h2 {
    font-size: 1.7rem;
    margin-bottom: 15px;
    color: #222;
}

.contact-info p {
    margin: 8px 0;
    color: #444;
    font-size: 1.1rem;
}

.map {
    margin-top: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Form Styling */
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2F3E46;
    box-shadow: 0 0 6px rgba(255,102,0,0.3);
}

.contact-form button {
    align-self: flex-start;
}

/* Product Pages */
.product-page {
  padding: 60px 10%;
}

.product-page h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.product-page .price {
  font-size: 2rem;
  font-weight: bold;
  color: black;
  margin-bottom: 20px;
}

.product-page .product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.product-page .product-gallery img {
  width: 100%;
  border-radius: 10px;
}

/* Footer */
.footer {
  background: #222;
  color: #ddd;
  padding: 0px;
  text-align: center;
  padding-top: 4%;
}

.footer h2 {
  color: #fff;
  margin-bottom: 10px;
}

.footer p {
  margin: 8px 0;
  font-size: 0.95rem;
}

.footer-contact p {
  margin: 5px 0;
}

.footer a {
  color: #00796B;
  text-decoration: none;
  font-weight: bold;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin-top: 20px;
  font-size: 0.85rem;
  color: #aaa;
}

/* ---------- Footer farm scene (non-sticky) ---------- */
.footer-farm-scene {
  position: relative;     
  width: 100%;
  height: 80px;           
  overflow: hidden;
  background: transparent;      
  pointer-events: none;   
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
}

/* bare ground (revealed when grass is cut) */
.footer-farm-scene .ground {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 0;
}

/* uncut grass (top layer, jagged blades) */
.footer-farm-scene .uncut-grass {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  z-index: 2;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='60'><path d='M0,60 L0,30 L10,60 L20,30 L30,60 L40,30 L50,60 L60,30 L70,60 L80,30 L90,60 L100,30 L100,60 Z' fill='%2300796B'/></svg>");
  background-repeat: repeat-x;
  background-position: bottom;
  background-size: 90px 50px;
  /* initially show full uncut grass */
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path 0.08s linear; 
}

/* tractor container (absolute inside scene) */
.footer-farm-scene .tractor {
  position: absolute;
  bottom: 5px;            /* vertical alignment - tune if needed */
  left: 0;                /* we will move with transform via JS */
  width: 150px;           /* fixed visual size - change for device sizes */
  z-index: 3;
  will-change: transform;
  visibility: hidden;     /* hidden until animation starts to avoid flash */
}

/* tractor image */
.footer-farm-scene .tractor img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: center center;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}

/* small wheel bounce for life */
@keyframes tractor-bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.footer-farm-scene .tractor img {
  animation: tractor-bounce 0.6s ease-in-out infinite;
}

/* Responsive: smaller tractor on small screens */
@media (max-width: 700px) {
  .footer-farm-scene { height: 96px; }
  .footer-farm-scene .ground,
  .footer-farm-scene .uncut-grass { height: 48px; background-size: 80px 48px; }
  .footer-farm-scene .tractor { width: 100px; bottom: 6px; }
}


/* Corner Badge */
.corner-badge {
    position: absolute;
    top: 5px;
    right: 15px;
    z-index: 9999;
    display: block;
    width: 190px;
    height: auto;
    transform: rotate(-5deg);
    transform-origin: top right;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

.corner-badge img {
    display: block;
    position: static;
    width: 100%;
    height: auto;
}

/* Smaller desktop and tablet screens */
@media (min-width: 769px) and (max-width: 1200px) {
    .header-container {
        max-width: 1040px;
        padding: 10px 180px 10px 30px;
    }

    .corner-badge {
        width: 155px;
        right: 12px;
    }

    .nav-menu {
        gap: 14px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-container {
        padding: 10px 20px;
        flex-wrap: wrap;
    }

    .corner-badge {
        width: 110px;
        top: 10px;
        left: 10px;
        right: auto;
        transform-origin: top left;
    }
}

