/* Harlow Surveyors - Custom Styles */

/* Base Styles */
:root {
    --primary-color: #2563EB;
    --secondary-color: #1E40AF;
    --accent-color: #60A5FA;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --background-light: #F9FAFB;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-dark);
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h3 {
    font-size: 1.875rem;
    line-height: 1.3;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Custom Font Sizes */
.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Animations */
header {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

header.scrolled {
    box-shadow: var(--shadow-lg);
}

/* Navigation */
nav a {
    position: relative;
    font-weight: 500;
    transition: var(--transition);
}

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

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

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

/* Hero Section */
.hero-bg {
    animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}

/* Buttons */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    line-height: 1.5;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 0;
}

/* Video Elements */
video {
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

video:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-2xl);
}

/* FAQ Section */
.faq-item {
    transition: var(--transition);
}

.faq-item.active {
    background-color: var(--gray-50);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content.show {
    max-height: 500px;
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Statistics Counter */
.counter {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    transition: var(--transition);
}

/* Star Ratings */
.star-rating {
    color: #FCD34D;
    display: inline-flex;
    gap: 2px;
}

/* Image Hover Effects */
.image-hover {
    overflow: hidden;
    border-radius: 0.75rem;
}

.image-hover img {
    transition: transform 0.5s ease;
}

.image-hover:hover img {
    transform: scale(1.1);
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    transition: width 1s ease;
    width: 0;
}

/* Floating Elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Mobile Menu */
#mobile-menu-btn {
    display: none;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--white);
    z-index: 1000;
    transition: left 0.3s ease;
    padding: 2rem;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 4rem;
}

.mobile-menu a {
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-dark);
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

.mobile-menu a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    #mobile-menu-btn {
        display: block;
    }
    
    nav .hidden {
        display: none;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .lg\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .lg\\:grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .md\\:flex-row {
        flex-direction: column;
    }
    
    .sm\\:flex-row {
        flex-direction: column;
    }
    
    /* Hero adjustments */
    .min-h-screen {
        min-height: 70vh;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .py-16 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .px-8 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mb-16 {
        margin-bottom: 2rem;
    }
    
    .mb-12 {
        margin-bottom: 2rem;
    }
    
    .gap-16 {
        gap: 2rem;
    }
    
    .gap-12 {
        gap: 1.5rem;
    }
    
    .gap-8 {
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .text-4xl {
        font-size: 1.875rem;
    }
    
    .text-2xl {
        font-size: 1.5rem;
    }
    
    .p-8 {
        padding: 1.5rem;
    }
    
    .py-4 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .px-8 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .space-x-8 > * + * {
        margin-left: 1rem;
    }
    
    .space-x-6 > * + * {
        margin-left: 0.75rem;
    }
    
    .space-x-4 > * + * {
        margin-left: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066CC;
        --text-dark: #000000;
        --text-light: #333333;
        --gray-200: #CCCCCC;
        --gray-300: #AAAAAA;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-bg {
        animation: none;
    }
    
    .animate-bounce {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        --primary-color: #60A5FA;
        --secondary-color: #3B82F6;
        --text-dark: #F9FAFB;
        --text-light: #D1D5DB;
        --background-light: #111827;
        --white: #1F2937;
        --gray-50: #374151;
        --gray-100: #4B5563;
        --gray-200: #6B7280;
        --gray-800: #F3F4F6;
        --gray-900: #F9FAFB;
    }
}

/* Focus States for Accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Loading Spinner */
.spinner {
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--gray-900);
    color: var(--white);
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--white);
}