/*
Theme Name: BAT Fence
Description: A custom WordPress theme for BAT Fence - premium fencing, pergolas and canopies solutions
Author: BAT Fence
Version: 1.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bat-fence
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
    }
    .nav-links {
        display: flex !important;
    }
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

html, body {
    overflow-x: hidden;
}

p {
    line-height: 1.8;
    color: #4a4a4a;
}

h2, h3 {
    letter-spacing: -0.5px;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Animations */
.about, .gallery, .contact {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

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

/* Header and Navigation */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(41, 128, 185, 0.2); /* Shadow using the button's blue color */
    transition: all 0.3s ease;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px; /* Made the line thicker */
    background: linear-gradient(to right, transparent, #3498db, transparent);
}

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

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo .main-text {
    display: flex;
    align-items: baseline;
    font-size: 2rem;
    font-weight: bold;
}

.logo .main-text .first-letter {
    color: #3498db;
}

.logo .main-text .rest {
    color: #ecf0f1;
}

.logo .site-logo {
    height: 40px;
    width: auto;
}

.logo { overflow: visible; }

.logo .tagline {
    font-size: 0.8rem;
    color: #bdc3c7;
    letter-spacing: 1px;
    margin-top: -8px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #0a2332;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: #3498db;
}

.nav-links a.contact-btn {
    background-color: #3498db;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-links a.contact-btn:hover {
    background-color: #2980b9;
}

/* Mobile Menu - Hidden by default on desktop */
.mobile-menu {
    display: none; /* Hide on desktop */
    font-size: 1.5rem;
    cursor: pointer;
    color: #0a2332; /* Darker color for visibility */
    background: none;
    border: none;
    padding: 0.5rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), 
    url('images/ograda1.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(3, 25, 38, 0.8) 0%, rgba(3, 25, 38, 0.4) 100%);
}

.hero-content {
    position: relative;
    animation: fadeIn 1s ease-out;
    max-width: 800px;
    padding: 0 20px;
    z-index: 1;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.6rem; /* 20% bigger than original 3rem */
    margin-bottom: 1.2rem;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    line-height: 1.3; /* Adjusted for better spacing with larger text */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); /* Adjusted shadow for 20% increase */
    text-transform: none; /* remove uppercase */
    text-align: center;
}

.hero-content h1 span {
    display: block; /* ensure spans are on separate lines */
    text-align: center; /* center each line */
}

.hero-content h1 span:first-child {
    margin-bottom: 0; /* Removed specific margin */
}

.hero-content h1 span:last-child {
    margin-bottom: 0; /* Removed specific margin */
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 6rem;
    letter-spacing: 1px;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    color: #ffffff;
}

.hero-content .cta-button {
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: background-color 0.3s;
}

.hero-content .cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.hero-content .cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* About Section */
.about {
    padding: 5rem 0;
    background-color: #ffffff;
}

.features {
    padding: 6rem 2rem 4rem; /* Added extra top padding for whitespace */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 4rem;
    position: relative;
    scroll-margin-top: 5rem; /* Apply scroll-margin-top directly to title */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #3498db, #2980b9);
}

.about-text {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 0 20px;
}

.feature-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid #e9ecef;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    background: #ffffff;
}

.feature-card i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
    background: #ebf5ff;
    padding: 1rem;
    border-radius: 50%;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.feature-card p {
    color: #666;
}

/* Gallery Section */
.gallery {
    padding: 5rem 0;
    background-color: #f1f3f5;
}

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

.gallery-navigation {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-nav {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gallery-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.gallery-nav:hover::after {
    transform: scaleX(1);
}

.gallery-nav i {
    margin: 0 0.5rem;
}

.gallery-section {
    margin-bottom: 4rem;
}

.section-subtitle {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.gallery-item {
    position: relative;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gallery-slider {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.gallery-slides {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 10;
}

.slider-nav:hover {
    background: rgba(0,0,0,0.8);
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

.slide-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Empty category styling */
.empty-category {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    min-height: 250px;
    margin: 0;
}

.empty-category-content {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
}

.empty-category-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #3498db;
}

.empty-category-content p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.empty-category-content small {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #8e9297;
    line-height: 1.4;
}

.gallery-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.gallery-item .caption {
    padding: 1rem;
}

.gallery-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Ensure gallery category titles are not forced to uppercase by CSS */
.gallery-grid h3 {
    text-transform: none;
    letter-spacing: 0;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background-color: #ffffff;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.contact-form {
    background-color: #f5f6fa;
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.submit-button {
    background-color: #3498db;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    width: 100%;
}

.submit-button:hover {
    background-color: #2980b9;
}

.contact-info {
    padding-top: 2.5rem;
    background-color: #eaf6fe; /* Light blue background */
    padding: 2rem; /* Add padding for better appearance */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Subtle shadow */
    align-self: start; /* Ensure background only covers content height */
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item i {
    font-size: 1.5rem;
    color: #3498db;
    background: #ebf5ff;
    padding: 1rem;
    border-radius: 50%;
}

.info-item div h3 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.info-item div p {
    color: #666;
}

/* Footer */
footer {
    background-color: #1a2730;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #e0e0e0;
}

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

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ffffff;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #b0b0b0;
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #1a2a3a;
    font-size: 0.95rem; 
    color: #FFFFFF; /* Set to pure white for better visibility */
    letter-spacing: 0.5px;
    font-weight: 500;
}

.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1000;
    transition: background 0.2s;
}

.back-to-top:hover {
    background: #2980b9;
}

.back-to-top-icon {
    width: 24px;
    height: 24px;
}

/* Update footer logo styles */
footer .logo {
    margin-bottom: 1.5rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-top: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 60px; /* Adjust this to match header height */
        left: 0;
        width: 100%;
        background-color: #ffffff; /* Light background for contrast */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        padding: 1rem 0;
        border-top: 2px solid #3498db;
        z-index: 1000;
    }

    .nav-links.active {
        display: flex; /* Show when active */
    }

    .nav-links a {
        color: #2c3e50; /* Darker text for visibility */
        padding: 1rem 2rem;
        text-align: left;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
        transition: background-color 0.3s;
    }

    .nav-links a:hover {
        background-color: #f8f9fa;
        color: #3498db;
    }

    .nav-links a.contact-btn {
        background-color: transparent; /* Remove button styling */
        color: #2c3e50;
        border-radius: 0;
        padding: 1rem 2rem;
    }

    .nav-links a.contact-btn:hover {
        background-color: #f8f9fa;
        color: #3498db;
    }

    .mobile-menu {
        display: block !important; /* Show hamburger icon on mobile */
    }

    /* Hero section mobile adjustment */
    .hero-content h1 {
        font-size: 2.4rem; /* 20% bigger than original 2rem */
        word-wrap: break-word; /* Allow long words to break */
        hyphens: auto; /* Allow hyphenation */
        line-height: 1.2; /* Better line spacing for mobile */
    }

    .hero-content p {
        font-size: 1rem; /* Adjusted for mobile */
        margin-bottom: 4rem;
    }

    /* Features grid mobile */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Gallery grid mobile */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Contact section mobile */
    .contact-content {
        grid-template-columns: 1fr;
    }

    /* Footer Mobile Optimization */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 1.5rem;
    }

    .footer-section:last-child {
        margin-bottom: 0;
    }

    .footer-section ul {
        padding-left: 0;
        margin: 0;
    }

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

    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }

    .social-links a {
        margin: 0 0.8rem;
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.6rem; /* 20% bigger than original 1.3rem */
        line-height: 1.1; /* Tighter line spacing for small screens */
    }

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

/* Form Labels */
.form-group label {
    position: relative; /* Change from absolute to relative */
    left: auto; /* Remove left positioning */
    top: auto; /* Remove top positioning */
    transform: none; /* Remove transform */
    display: block; /* Make label a block element */
    margin-bottom: 0.5rem; /* Add some space below the label */
    font-weight: 600;
    color: #333;
    background-color: transparent; /* Ensure background is transparent */
    padding: 0;
    transition: none; /* Remove transition */
    pointer-events: auto; /* Allow pointer events */
}

.form-group textarea ~ label {
    top: auto;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: auto;
    font-size: 1rem; /* Reset font size */
    background: transparent; /* Reset background */
    color: #333; /* Reset color */
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #3498db;
    background-color: #ffffff;
}

.footer-bottom p {
    color: #FFFFFF; /* Changed from #e0e0e0 to pure white for better visibility */
    letter-spacing: 0.5px;
    font-weight: 500;
}