/* Global Styles */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FFC107;
    --dark-color: #333;
    --light-color: #f9f9f9;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Removes tap highlight on Android */
}

html {
    font-size: 16px; /* Baseline font size */
    -webkit-text-size-adjust: 100%; /* Prevents text size adjustment on orientation change */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
    width: 100%;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

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

/* Licensed Badge */
.license-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 99;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.license-badge img {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    animation: pulse 2s infinite alternate;
}

.badge-text {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    margin-top: 5px;
    box-shadow: var(--box-shadow);
}

.license-badge:hover {
    transform: scale(1.05);
}

@keyframes pulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    height: 60px;
}

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

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 600;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    background: linear-gradient(135deg, #e6f7e6 0%, #d1edf9 100%);
    padding: 50px 20px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: #45a049;
    color: white;
    transform: translateY(-2px);
}

.animation-container {
    width: 100%;
    max-width: 800px;
    height: 250px;
    position: relative;
    overflow: hidden;
    background-color: #f0f8ff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

#animation-scene {
    position: relative;
    width: 100%;
    height: 100%;
}

#road {
    position: absolute;
    bottom: 30px;
    width: 100%;
    height: 20px;
    background-color: #aaa;
}

.bin-element {
    position: absolute;
    width: 70px;
    height: 100px;
    bottom: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
}

#wheelie-bin {
    background-image: url('wheelie-bin.png');
}

#garden-bin {
    background-image: url('garden-waste.png');
}

#commercial-bin {
    background-image: url('commercial-waste.png');
}

#recycling-bin {
    background-image: url('metal-recycling.png');
}

#bag-bin {
    background-image: url('bag-collection.png');
}

/* Services Section */
.services {
    padding: 80px 20px;
    text-align: center;
    background-color: white;
}

.services h2 {
    font-size: 2.2rem;
    margin-bottom: 50px;
    color: var(--dark-color);
    position: relative;
}

.services h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background-color: white;
    padding: 30px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

/* About Section */
.about {
    padding: 80px 20px;
    background-color: #f5f5f5;
}

.about h2 {
    font-size: 2.2rem;
    margin-bottom: 50px;
    text-align: center;
    color: var(--dark-color);
    position: relative;
}

.about h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

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

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

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #555;
}

.about-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.team-image {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Contact Section */
.contact {
    padding: 80px 20px;
    background-color: white;
}

.contact h2 {
    font-size: 2.2rem;
    margin-bottom: 50px;
    text-align: center;
    color: var(--dark-color);
    position: relative;
}

.contact h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

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

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-form h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.submit-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #45a049;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    padding: 30px;
}

.contact-info h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 20px 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}

.footer-logo, .footer-links, .footer-social {
    flex: 1;
    min-width: 250px;
}

.logo-small {
    height: 50px;
    margin-bottom: 15px;
}

.footer-links h4, .footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

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

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ddd;
}

.footer-links ul li a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: #ddd;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #555;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    html {
        font-size: 15px; /* Slightly reduce base font size */
    }
    
    header {
        flex-direction: column;
        padding: 20px;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    nav ul li {
        margin-left: 15px;
        margin-right: 15px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .animation-container {
        height: 200px;
    }
    
    .license-badge img {
        width: 70px;
        height: 70px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on input focus in iOS */
        padding: 12px; /* Larger touch targets */
    }
    
    .submit-button {
        width: 100%; /* Full width button on mobile */
        padding: 15px; /* Larger touch target */
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px; /* Further reduce base font size */
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    nav ul li a {
        font-size: 1.1rem; /* Larger touch targets for navigation */
        padding: 8px 4px; /* Add padding for better touch */
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .animation-container {
        height: 150px;
    }
    
    .license-badge {
        bottom: 10px;
        right: 10px;
    }
    
    .license-badge img {
        width: 60px;
        height: 60px;
    }
    
    .badge-text {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .service-card {
        padding: 20px 15px;
    }
    
    .contact-container {
        gap: 20px;
    }
    
    .contact-form,
    .contact-info {
        padding: 20px 15px;
    }
    
    /* Improve tap targets */
    .social-icon {
        padding: 10px 5px;
        margin: 0 5px;
        font-size: 1.1rem;
    }
    
    .footer-content {
        gap: 25px;
    }
}

/* Additional mobile optimizations */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Fix for landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 450px;
    }
    
    .animation-container {
        height: 120px;
    }
    
    header {
        padding: 10px 20px;
    }
    
    .logo {
        height: 40px;
    }
}