/* TwoFish Technology Brand CSS Tokens */
:root {
    /* Brand Colors */
    --green-brand: #a2b72f;
    --green-field: #a2b72f;
    --yellow: #FFC709;
    --orange: #F7941D;
    --blue-dark: #008AA0;
    --blue-light: #00B0CC;
    --magenta: #E20C7C;
    --red: #E22F22;
    
    /* Neutrals */
    --ink-900: #121212;
    --ink-700: #2A2A2A;
    --ink-500: #4A4A4A;
    --ink-300: #8A8A8A;
    --paper: #FFFFFF;
    --paper-tint: #F7F8F6;
    
    /* Design Tokens */
    --radius: 12px;
    --shadow: 0 8px 24px rgba(0,0,0,.08);
    --shadow-hover: 0 12px 32px rgba(0,0,0,.12);
}

/* Typography */
body {
    font-family: 'Inter', 'Proxima Nova', sans-serif;
    line-height: 1.6;
    color: var(--ink-700);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    font-weight: 700;
}

.display-4 {
    font-weight: 700;
    line-height: 1.15;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand img {
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--ink-700);
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--green-field);
}

.navbar .btn-primary {
    padding: 0.5rem 1.5rem;
}

/* Hero Typography */
.hero-title {
    font-size: clamp(2.1rem, 5.6vw, 4.2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero-title .title-break {
    display: block;
    margin-bottom: 0.2em;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    line-height: 1.4;
    opacity: 0.9;
}

/* Trust Logos Section - Removed absolute positioning as it's now inline */

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
}

.trust-logo {
    height: 120px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.trust-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 12px;
}

.modal-body {
    padding: 0;
}

.modal-body .roi-calculator {
    border: none;
    box-shadow: none;
    margin: 0;
}

/* Form View in Modal */
#calculator-view {
    opacity: 1;
}

#form-view {
    background: white;
    display: none;
}

#form-view .form-control {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#form-view .form-control:focus {
    border-color: var(--green-field);
    box-shadow: 0 0 0 3px rgba(162, 183, 47, 0.1);
}

#form-view .form-label {
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 0.5rem;
}

/* Hero Button - Dark with White Hover */
.btn-dark-hero {
    font-size: 1.25rem;
    background: var(--ink-900);
    border: 2px solid var(--ink-900);
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.btn-dark-hero:hover {
    background: white;
    border-color: white;
    color: var(--ink-900);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    .hero-section {
        overflow-x: hidden;
    }
    
    .hero-title {
        font-size: 2.1rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .trust-logo {
        height: 80px;
    }
    
    .hero-image-wrapper {
        margin-top: 2rem;
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .trust-section-inline {
        margin-top: 2rem;
        text-align: center;
        max-width: 100%;
        padding: 0 1rem;
        margin-left: auto;
        margin-right: auto;
    }
    
    .trust-logo-inline {
        height: 40px;
        max-width: 80px;
    }
    
    .trust-logos-row {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .trust-logos-grid {
        max-width: 100%;
        padding: 0;
    }
}

/* ROI Calculator Styles */
.roi-calculator {
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    position: relative;
    z-index: 10 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 3px solid var(--green-field);
}

.roi-calculator:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

/* Calculator Input Styles */
.calculator-inputs {
    margin-bottom: 1.5rem;
}

.input-group-styled {
    flex: 1;
}

.input-row {
    display: flex;
    gap: 0.75rem;
}

.form-label-styled {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control-styled {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--paper-tint);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: var(--ink-900);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-control-styled::placeholder {
    color: var(--ink-300);
}

.form-control-styled:focus {
    outline: none;
    background: white;
    border-color: var(--green-field);
    box-shadow: 0 0 0 3px rgba(162, 183, 47, 0.2);
}

select.form-control-styled {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234A4A4A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 2.5rem;
}

/* Slider Styles */
.slider-group {
    margin-bottom: 1rem;
}

.slider-container {
    position: relative;
    padding: 1rem 0;
}

.slider-styled {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider-styled::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--green-field);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.slider-styled::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-styled::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--green-field);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: none;
}

.slider-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green-field);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Results Styles */
.calculator-results {
    padding-top: 1.5rem;
    border-top: 2px solid #e0e0e0;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.result-card {
    background: var(--paper-tint);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
}

.result-card-primary {
    grid-column: span 2;
    background: var(--green-field);
    border-color: var(--green-field);
}

.result-card-primary .result-label,
.result-card-primary .result-value {
    color: white;
}

.result-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ink-500);
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink-900);
}

.btn-calculator {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--green-field);
    color: white;
    text-align: center;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-calculator:hover {
    background: var(--green-brand);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.video-wrapper iframe {
    width: 100%;
    height: 315px;
    border: none;
    border-radius: var(--radius);
    display: block;
}

/* Video Thumbnail */
.video-thumbnail {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius);
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

/* Play Button */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(162, 183, 47, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.play-button i {
    color: white;
    font-size: 30px;
    margin-left: 5px;
}

.video-thumbnail:hover .play-button {
    background: rgba(162, 183, 47, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .roi-calculator {
        margin-top: 2rem;
    }
    
    .input-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-card-primary {
        grid-column: span 1;
    }
    
    .dashboard-image-wrapper {
        margin-bottom: 2rem;
    }
}

.calculator-results .result-item {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.calculator-results .result-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Calculator result styling */
.calculator-results #out-hour-cost span {
    color: var(--blue-dark) !important;
}

.calculator-results #out-incident-cost span {
    color: #dc3545 !important;
}

.calculator-results #out-monthly-cost span {
    color: #dc3545 !important;
}

.calculator-results #out-annual-cost span {
    color: white !important;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Secondary CTA */
.secondary-cta {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.95;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.secondary-cta:hover {
    opacity: 1;
    transform: translateX(5px);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(162, 183, 47, 0.85);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-top: 2rem;
}

/* Hero 3D Image */
.hero-image-wrapper {
    position: relative;
    z-index: 3;
    perspective: 1000px;
    width: 100%;
    max-width: 500px;
}

.hero-3d-image {
    width: 100%;
    height: auto;
    transition: transform 0.15s ease-out;
    transform-style: preserve-3d;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* Trust Section Inline */
.trust-section-inline {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 500px;
}

.trust-logos-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.trust-logos-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.trust-logo-inline {
    height: 60px;
    width: auto;
    max-width: 150px;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: all 0.3s ease;
}

.trust-logo-inline:hover {
    opacity: 1;
    transform: scale(1.05);
}

.hero-section .col-lg-6 {
    position: relative;
    z-index: 3;
}

/* Fallback for video not supported */
@media (max-width: 768px) {
    .hero-video {
        display: none;
    }
    
    .hero-section {
        background: var(--green-field);
    }
}

/* Buttons */
.btn-primary {
    background: var(--green-field);
    border: 2px solid var(--green-field);
    color: white !important;
    border-radius: var(--radius);
    font-weight: 500;
    padding: 12px 32px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: white;
    border-color: var(--green-field);
    color: var(--green-field) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--green-brand);
    border-color: var(--green-brand);
    color: white !important;
}

.btn-success:hover {
    background: white;
    border-color: var(--green-brand);
    color: var(--green-brand) !important;
}

/* Feature Cards */
.feature-card {
    padding: 2rem 1rem;
    height: 100%;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    color: var(--green-field);
}

.feature-icon-img {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon-img img {
    width: auto;
    max-width: 100%;
    height: 240px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Benefits List */
.benefit-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.benefit-item:last-child {
    border-bottom: none;
}

/* ROI Calculator */
.roi-calculator {
    background: var(--paper-tint) !important;
    border: 2px solid var(--green-field);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.calculator-inputs .form-control {
    border: 1px solid var(--ink-300);
    border-radius: 8px;
    padding: 12px 16px;
}

.calculator-inputs .form-control:focus {
    border-color: var(--green-field);
    box-shadow: 0 0 0 0.2rem rgba(162, 183, 47, 0.25);
}

.result-item {
    padding: 8px 0;
    font-size: 1.1rem;
}

/* Audit Form Section */
.audit-form-section {
    background: linear-gradient(135deg, #a2b72f 0%, #a2b72f 100%);
}

/* Audit Report Preview */
.audit-report-preview {
    perspective: 1000px;
}

.audit-report-preview img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.audit-report-preview:hover img {
    transform: rotateY(-5deg) rotateX(5deg) scale(1.02);
}

.audit-form-card {
    background: white;
    color: #333;
}

.audit-form-card .form-label {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.audit-form-card .form-control {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #333;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.audit-form-card .form-control:focus {
    background: white;
    border-color: #a2b72f;
    box-shadow: 0 0 0 0.25rem rgba(162, 183, 47, 0.25);
}

/* Form Styling */
.audit-form {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-control {
    border: 2px solid var(--ink-300);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--green-field);
    box-shadow: 0 0 0 0.2rem rgba(162, 183, 47, 0.25);
}

.form-control.is-invalid {
    border-color: var(--red);
}

.invalid-feedback {
    color: var(--red);
    font-size: 0.875rem;
}

/* Success State */
.success-state {
    border: 2px solid var(--green-brand);
    box-shadow: var(--shadow);
}

/* Bootstrap Color Overrides for Consistency */
.text-success {
    color: var(--green-brand) !important;
}

.alert-success {
    background-color: rgba(162, 183, 47, 0.1);
    border-color: var(--green-brand);
    color: var(--ink-700);
}

/* FAQ Accordion */
.accordion-item {
    border: 1px solid rgba(0,0,0,0.125);
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.accordion-button {
    background: var(--paper-tint);
    color: var(--ink-700);
    font-weight: 500;
    padding: 1.5rem;
}

.accordion-button:not(.collapsed) {
    background: var(--green-field);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(162, 183, 47, 0.25);
}

.accordion-body {
    padding: 1.5rem;
    background: white;
}

/* Sticky Mobile CTA */
.sticky-mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: white;
    padding: 1rem;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
}

/* Footer */
.footer {
    background: var(--paper-tint) !important;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.footer a {
    color: var(--ink-500);
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--green-field);
}

/* Local Proof */
.local-proof {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Privacy Note */
.privacy-note {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Map Wrapper */
.map-wrapper {
    position: relative;
    background: #1a1a1a;
    border: 2px solid rgba(162, 183, 47, 0.3);
}

.map-wrapper iframe {
    display: block;
    transition: filter 0.3s ease;
}

.map-wrapper:hover iframe {
    filter: grayscale(0%) contrast(1) !important;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .btn-lg {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .roi-calculator {
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }
    
    /* Fix hero content on small screens */
    .hero-content {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .hero-section .col-lg-6 {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Ensure button doesn't overflow */
    .btn-dark-hero {
        max-width: 100%;
        word-wrap: break-word;
    }
    
    /* Fix trust section on mobile */
    .trust-section-inline {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .trust-logo-inline {
        height: 35px;
        max-width: 70px;
    }
}

/* Trust Logos */
.trust-logos {
    gap: 2rem;
}

.trust-logo {
    height: 60px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.trust-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* Testimonials */
.testimonial-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--green-field);
    border-radius: 50%;
    padding: 20px;
}

.carousel-indicators {
    margin-bottom: -50px;
}

.carousel-indicators [data-bs-target] {
    background-color: var(--green-field);
}

/* Footer */
.footer {
    background: var(--ink-900) !important;
}

.footer .text-primary {
    color: var(--green-brand) !important;
}

.footer a:hover {
    color: var(--green-brand) !important;
}

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

/* Focus styles for better accessibility */
a:focus,
button:focus,
.form-control:focus {
    outline: 2px solid var(--blue-light);
    outline-offset: 2px;
}

/* High contrast support */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 8px 24px rgba(0,0,0,.3);
    }
    
    .btn-primary {
        border-width: 3px;
    }
}

/* Print styles */
@media print {
    .utility-bar,
    .sticky-mobile-cta,
    .btn,
    .footer {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
}
