/**
 * Sauria Theme - Base Reset CSS
 * Based on modern CSS reset principles
 * Replaces hello-elementor reset.css
 */

/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin and padding */
html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--ci-bg, #fff);
    color: var(--ci-text, #333);
    font-family: var(--ci-body-font, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Sticky footer layout */
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Main content area should grow to push footer down */
main,
.site-main,
.elementor,
[data-elementor-type="wp-page"],
[data-elementor-type="wp-post"],
.e-con {
    flex: 1 0 auto;
}

/* Footer should not grow */
footer,
.site-footer,
[data-elementor-type="footer"] {
    flex-shrink: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--ci-text, inherit);
    font-family: var(--ci-heading-font, 'Inter', inherit);
    font-weight: 500;
    line-height: 1.2;
    margin-block-start: 0.5rem;
    margin-block-end: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-block-start: 0;
    margin-block-end: 0.9rem;
}

/* Links */
a {
    background-color: transparent;
    color: var(--ci-link, inherit);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--ci-link-hover, inherit);
}

a:not([href]):not([tabindex]),
a:not([href]):not([tabindex]):hover,
a:not([href]):not([tabindex]):focus {
    color: inherit;
    text-decoration: none;
}

/* Images */
img {
    border-style: none;
    max-width: 100%;
    height: auto;
}

/* Forms */
label {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #666;
    border-radius: 3px;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: #333;
    outline: none;
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
    -webkit-appearance: button;
    background-color: transparent;
    border: 1px solid currentColor;
    border-radius: 3px;
    color: inherit;
    cursor: pointer;
    display: inline-block;
    font-size: 1rem;
    font-weight: 400;
    padding: 0.5rem 1rem;
    text-align: center;
    transition: all 0.3s;
    white-space: nowrap;
    width: auto;
}

button:not(:disabled),
[type="button"]:not(:disabled),
[type="submit"]:not(:disabled) {
    cursor: pointer;
}

/* Tables */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    margin-block-end: 15px;
    font-size: 0.9em;
    background-color: transparent;
}

table td,
table th {
    border: 1px solid hsla(0, 0%, 50%, 0.5);
    padding: 15px;
    vertical-align: top;
    line-height: 1.5;
}

table th {
    font-weight: 700;
}

/* Lists */
dd, dl, dt, li, ol, ul {
    margin-block-start: 0;
    margin-block-end: 0;
    background: transparent;
    border: 0;
    outline: 0;
    vertical-align: baseline;
}

/* Misc */
hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
}

pre {
    font-family: monospace, monospace;
    font-size: 1em;
    white-space: pre-wrap;
}

code, kbd, samp {
    font-family: monospace, monospace;
    font-size: 1em;
}

small {
    font-size: 80%;
}

[hidden],
template {
    display: none;
}

/* Screen reader only */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip link */
.skip-link {
    left: -9999rem;
    top: 2.5rem;
    z-index: 999999999;
    text-decoration: underline;
}

.skip-link:focus {
    display: block;
    left: 6px;
    top: 7px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    line-height: normal;
    padding: 15px 23px 14px;
    z-index: 100000;
    right: auto;
}

/* Print styles */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
    
    img {
        break-inside: avoid;
    }
    
    h2, h3, p {
        orphans: 3;
        widows: 3;
    }
    
    h2, h3 {
        break-after: avoid;
    }
}

/* WordPress Admin Bar Offset */
body.admin-bar {
    padding-top: 32px;
}

body.admin-bar .elementor-location-header,
body.admin-bar header.site-header,
body.admin-bar [data-elementor-type="header"] {
    top: 32px !important;
}

/* Sticky header support with admin bar */
body.admin-bar .elementor-sticky--active,
body.admin-bar .sticky-header,
body.admin-bar [data-settings*="sticky"] {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar {
        padding-top: 46px;
    }
    
    body.admin-bar .elementor-location-header,
    body.admin-bar header.site-header,
    body.admin-bar [data-elementor-type="header"] {
        top: 46px !important;
    }
    
    body.admin-bar .elementor-sticky--active,
    body.admin-bar .sticky-header,
    body.admin-bar [data-settings*="sticky"] {
        top: 46px !important;
    }
}

@media screen and (max-width: 600px) {
    body.admin-bar {
        padding-top: 0;
    }
    
    body.admin-bar .elementor-location-header,
    body.admin-bar header.site-header,
    body.admin-bar [data-elementor-type="header"],
    body.admin-bar .elementor-sticky--active,
    body.admin-bar .sticky-header {
        top: 0 !important;
    }
}
