/**
 * BTR Pest Control - Main Stylesheet
 * Modern, Clean, Conversion-Focused Design
 */

/* ==========================================================================
   VARIABLES & RESET
   ========================================================================== */

:root {
    /* Colors */
    --color-primary: #093244;
    --color-secondary: #00A6A6;
    --color-accent: #FF6B35;
    --color-success: #2ECC71;
    --color-dark: #1A1A2E;
    --color-light: #F8F9FA;
    --color-white: #FFFFFF;
    --color-gray-100: #F5F7FA;
    --color-gray-200: #E4E7EB;
    --color-gray-300: #CBD2D9;
    --color-gray-400: #9AA5B1;
    --color-gray-500: #7B8794;
    --color-gray-600: #616E7C;
    --color-gray-700: #52606D;
    --color-gray-800: #3E4C59;
    --color-gray-900: #323F4B;

    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-accent: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;

    /* Container */
    --container-max-width: 1200px;
    --container-padding: 1.5rem;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

html, body {
    max-width: 100vw;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-white);
    overflow-x: hidden;
    position: relative;
}

/* Site-wide floating insects background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: transparent;
}

.site-insects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.site-main,
.site-header,
.site-footer {
    position: relative;
    z-index: 2;
}

.floating-insect {
    position: absolute;
    opacity: 0.15;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.2));
    will-change: transform;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.sr-only, .skip-to-content {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-to-content:focus {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    width: auto;
    height: auto;
    padding: 1rem 2rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background-color: var(--color-accent);
    color: var(--color-white);
    font-weight: 700;
    text-decoration: none;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-accent);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

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

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

.btn-secondary:hover {
    background-color: #008C8C;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

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

.btn-call {
    font-size: 1.125rem;
    padding: 1.25rem 2.5rem;
}

.btn .icon {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.header-top {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

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

.header-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-contact .phone-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-white);
    font-weight: 600;
}

.header-contact .phone-link:hover {
    color: var(--color-accent);
}

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

.header-social a {
    color: var(--color-white);
    transition: color var(--transition-fast);
}

.header-social a:hover {
    color: var(--color-accent);
}

.header-main {
    padding: 1rem 0;
    overflow: visible !important;
    min-height: 70px;
}

.header-main .container {
    overflow: visible !important;
}

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo img,
.logo-image {
    height: 60px;
    width: auto;
    filter: drop-shadow(2px 2px 0px #093244) drop-shadow(-1px -1px 0px #093244);
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: #093244;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
    line-height: 1.3;
    display: inline-block;
}

/* Navigation */
.main-nav {
    flex: 1;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-dark);
    padding: 0.5rem 0;
    display: block;
    transition: color var(--transition-fast);
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--color-accent);
}

/* Section active state - shows when on any page within this section */
.nav-menu > li.section-active > a {
    color: var(--color-accent);
    position: relative;
}

.nav-menu > li.section-active > a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--color-white);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-dark);
    transition: all var(--transition-fast);
}

.dropdown li a:hover {
    background-color: var(--color-gray-100);
    color: var(--color-accent);
}

.mobile-menu-toggle {
    display: none;
}

/* Hide dropdown toggle on desktop - shown via responsive.css on mobile */
.dropdown-toggle {
    display: none;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0A4A5E 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 3rem 1.5rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-trust {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.trust-badge .icon {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--color-gray-600);
}

/* ==========================================================================
   SERVICES GRID
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    text-align: center;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-accent);
}

.service-card.revealed {
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    padding: 0;
    background-color: var(--color-gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.service-icon svg {
    width: 40px;
    height: 40px;
    /* Only apply fill if not using inline styles */
}

.service-icon:not([style]) svg {
    fill: var(--color-primary);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.service-price {
    font-family: var(--font-accent);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.service-price .starting {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-gray-600);
}

.service-card p {
    color: var(--color-gray-600);
    margin-bottom: 1.5rem;
}

.service-warranty {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-success);
    color: var(--color-white);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background-color: var(--color-dark);
    color: var(--color-light);
}

.footer-main {
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-col h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.footer-col p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.footer-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-success);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-light);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-contact .icon {
    width: 16px;
    height: 16px;
    fill: var(--color-accent);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.footer-contact a {
    color: var(--color-light);
}

.footer-contact a:hover {
    color: var(--color-accent);
}

.footer-social h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-white);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
}

.footer-bottom a {
    color: var(--color-light);
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   FLOATING CALL BUTTON
   ========================================================================== */

.floating-call-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-accent);
    color: var(--color-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-2xl);
    transition: all var(--transition-base);
    animation: pulse 2s infinite;
}

.floating-call-btn:hover {
    transform: scale(1.1);
    background-color: #E55A2B;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7); }
    50% { box-shadow: 0 0 0 15px rgba(255, 107, 53, 0); }
}
