/*
 * Mobile specific styles for HeatSupply Theme
 *
 * These styles will be loaded only on mobile devices
 * through the media query in functions.php
 */

/* Fix horizontal scrolling issues */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.container {
    padding-left: 10px;
    padding-right: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.content-area-wrapper {
    margin-left: 0;
    margin-right: 0;
}

img,
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
}

/* Wide elements constraints */
pre,
table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

/* Optimize header for mobile */
.top-header-content {
    flex-direction: column;
    align-items: flex-start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.contact-info span {
    margin-bottom: 5px;
}

.social-links {
    display: flex;
    margin-top: 5px;
}

.site-branding {
    flex-direction: column;
    align-items: flex-start;
}

.custom-logo {
    max-height: 50px;
    margin-bottom: 5px;
}

/* Optimized navigation for mobile */
.menu-toggle {
    display: block;
}

.main-navigation ul.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white-color);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.main-navigation ul.nav-menu.toggled-on {
    display: block;
}

.main-navigation ul {
    flex-direction: column;
    padding: 0;
}

.main-navigation a {
    padding: 12px 20px;
}

.main-navigation .sub-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    display: none;
    padding: 0 0 0 20px;
}

/* Reduce hero padding on mobile */
.hero-section {
    padding: 60px 0;
}

.hero-content h1 {
    font-size: 2rem;
}

.hero-description {
    font-size: 1rem;
}

/* Switch grids to single column */
.features-grid,
.projects-grid,
.heatsupply-services-grid {
    grid-template-columns: 1fr;
}

/* Simplify footer on mobile */
.footer-widgets-wrapper {
    grid-template-columns: 1fr;
}

.site-info .container {
    flex-direction: column;
}

.copyright {
    text-align: center;
    margin-bottom: 10px;
}

.footer-links-menu {
    justify-content: center;
}

/* Optimize forms for mobile */
.form-row {
    flex-direction: column;
}

.form-row .form-group {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Optimize contact form for mobile */
.contact-form-wrapper {
    padding: 20px 15px;
}

/* Make back to top button smaller */
.back-to-top {
    width: 35px;
    height: 35px;
    bottom: 20px;
    right: 20px;
}

/* Smaller margin for post elements */
.post-card {
    margin-bottom: 20px;
}

.post-content {
    padding: 15px;
    width: 100%;
}

.entry-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Mobile optimized spacing */
.section-padding {
    padding: 40px 0;
}

.section-header {
    margin-bottom: 30px;
}

.section-title {
    margin-bottom: 15px;
}

/* Better touch target sizes */
.heatsupply-service-button,
.read-more,
.button,
.cta-button {
    padding: 12px 20px;
    display: block;
    text-align: center;
}

/* Bigger form inputs for better touch targets */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    padding: 12px 15px;
    margin-bottom: 15px;
}

/* Smaller section titles */
h2.section-title {
    font-size: 1.6rem;
}

/* Optimize pagination */
.pagination,
.page-numbers {
    margin: 20px 0;
    text-align: center;
}

.page-numbers li {
    margin: 0 2px;
}

/* Mobile-optimized forms */
.wpcf7-form p {
    margin-bottom: 15px;
}

.wpcf7-submit {
    width: 100%;
    padding: 15px;
}

/* Optimize content and sidebar layout */
.content-area-wrapper {
    flex-direction: column;
}

.content-area,
.widget-area {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 30px;
}

/* Improve breadcrumbs on mobile */
.page-header .breadcrumbs {
    font-size: 0.75rem;
    line-height: 1.5;
    justify-content: center;
    gap: 5px;
}

.page-header .breadcrumbs .separator {
    margin: 0 3px;
    display: inline-block;
    color: var(--primary-color);
    font-weight: bold;
}

/* Optimize page content on mobile */
.entry-content p {
    font-size: 1rem;
    line-height: 1.6;
}

.posts-grid {
    grid-template-columns: 1fr !important;
    width: 100%;
}
