﻿/* ===== COMPLETE RESET FOR FULL-WIDTH LAYOUT ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* HTML & Body Base */
html {
    font-size: 14px;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    min-height: 100%;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
}

/* Improved font sizing for better mobile readability */
@media (min-width: 360px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 17px;
    }
}

/* Body Styles */
body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
    background-color: #efefef;
    padding-top: 80px !important; /* Navbar height */
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #1b2438;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile body optimizations */
@media (max-width: 767px) {
    body {
        padding-top: 70px !important; /* Slightly reduced navbar height on mobile */
    }
}

/* Remove ALL Bootstrap container padding/margins */
.container,
.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100%;
}

/* Add safe container padding for mobile */
.container-safe {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container-safe {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-safe {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Safe area support for notched devices */
@supports(padding: max(0px)) {
    .container-safe {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* Improved focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ff5d00;
    outline-offset: 2px;
}

/* Remove focus for mouse users */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
    outline: none;
}

/* Better image handling */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Improved link styles */
a {
    color: #ff5d00;
    text-decoration: none;
    transition: color 0.3s ease;
}

    a:hover {
        color: #e65100;
    }

/* Better button base styles */
/*button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}*/

/* Form element improvements */
/*input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    width: auto;
    max-width: 100%
}

    input:focus,
    textarea:focus,
    select:focus {
        border-color: #ff5d00;
        box-shadow: 0 0 0 2px rgba(255, 93, 0, 0.1);
    }*/

/* Prevent zoom on iOS inputs */
/*@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="search"],
    textarea {
        font-size: 16px;*/ /* Prevent zoom on iOS */
    /*}
}*/

/* Selection styles */
::selection {
    background-color: rgba(255, 93, 0, 0.2);
    color: #1b2438;
}

::-moz-selection {
    background-color: rgba(255, 93, 0, 0.2);
    color: #1b2438;
}

/* Scrollbar styling (where supported) */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
    }

    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    ::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

        ::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background-color: #fff;
        color: #000;
    }

    a {
        color: #0000ff;
        text-decoration: underline;
    }
}

/* Print styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        padding-top: 0 !important;
        background: white !important;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    abbr[title]::after {
        content: " (" attr(title) ")";
    }
}

/* Utility classes for responsive spacing */
.mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .mobile-padding {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Hide/Show utilities for responsive design */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }

    .desktop-only {
        display: block;
    }
}

/* Touch device detection */
@media (hover: none) and (pointer: coarse) {
    /* Styles for touch devices */
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
}
