/* Global Responsive Fixes */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container Adjustments */
.container {
    max-width: 1400px !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 1280px) {
    .container {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

/* Image Responsiveness */
img {
    max-width: 100%;
    height: auto;
}

/* Spacing Standards */
.section-py {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 768px) {
    .section-py {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Layout Fixes */
.grid-standard {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .grid-standard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .grid-standard {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2rem;
    }
}

/* Typography Scale */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

/* Header Responsiveness */
#sticky-header {
    width: 100%;
}

.logo {
    transition: width 0.3s ease;
}

@media (max-width: 640px) {
    .logo {
        max-width: 120px !important;
    }
}

/* PJAX Main Content Transition — z-index keeps scrolling content under fixed header */
main {
    min-height: 80vh;
    position: relative;
    z-index: 0;
}

/* Card Improvements */
.responsive-card {
    border-radius: 1.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Form Fixes */
input, select, textarea {
    max-width: 100%;
    font-size: 16px !important; /* Prevent iOS zoom */
}

/* Utility to hide on specific breakpoints */
.hide-on-mobile {
    display: none !important;
}

@media (min-width: 768px) {
    .hide-on-mobile {
        display: block !important;
    }
}

.hide-on-desktop {
    display: block !important;
}

@media (min-width: 1024px) {
    .hide-on-desktop {
        display: none !important;
    }
}
