/* Base Styles */
:root {
    --dark-steel: #1E2A3A;
    --red: #E74C3C;
    --red-hover: #C0392B;
    --light-gray: #F8F9FA;
    --white: #FFFFFF;
    --dark-gray: #7F8C8D;
    --gradient-bg: linear-gradient(135deg, var(--dark-steel), #34495E);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--white);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    margin-bottom: 15px;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

section {
    padding: 80px 0;
}

/* Section Subtext */
.section-subtext {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #5D6D7E;
    line-height: 1.7;
    font-size: 18px;
}

.section-subtext p {
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--red);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--red-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
}

.btn-small {
    padding: 10px 18px;
    font-size: 13px;
    border-radius: 30px;
}

/* Header */
header {
    background-color: rgba(30, 42, 58, 0.95);
    color: var(--white);
    position: fixed;
    width: 100%;
    top: 0;
    height: 80px;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    margin-bottom: 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo h1 span {
    color: var(--red);
}

.nav-menu {
    display: flex;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
    font-size: 15px;
}

.nav-menu a:not(.btn-small):after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--red);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-menu a:not(.btn-small):hover:after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--red);
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: var(--red);
}

/* Hero Section */
.hero {
    background-color: var(--dark-steel); /* Fallback color */
    color: var(--white);
    text-align: center;
    padding: 180px 0 120px;
    position: relative;
    overflow: hidden;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-image: url('gas-pipes.png'); /* Direct CSS fallback */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(30, 42, 58, 0.75), rgba(30, 42, 58, 0.85)); /* Overlay for better text readability */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero h3 {
    font-size: 26px;
    font-weight: 400;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Section */
.services {
    background-color: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(231, 76, 60, 0.05), transparent 70%);
    border-radius: 50%;
}

.services h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-steel);
    font-weight: 800;
    font-size: 36px;
    position: relative;
    padding-bottom: 15px;
}

.services h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--red);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: var(--white);
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.service-item:hover::before {
    transform: scaleX(1);
}

.service-item .icon {
    font-size: 46px;
    color: var(--red);
    margin-bottom: 25px;
}

.service-item h3 {
    color: var(--dark-steel);
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 700;
}

.service-item ul li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
    line-height: 1.5;
}

.service-item ul li:before {
    content: '•';
    color: var(--red);
    position: absolute;
    left: 0;
    font-size: 20px;
    line-height: 1;
}

/* Customers Section */
.customers {
    text-align: center;
    background-color: var(--white);
    position: relative;
}

.customers::before {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(30, 42, 58, 0.05), transparent 70%);
    border-radius: 50%;
}

.customers h2 {
    margin-bottom: 20px;
    color: var(--dark-steel);
    font-weight: 800;
    font-size: 36px;
    position: relative;
    padding-bottom: 15px;
}

.customers h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--red);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.customer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.customer-item {
    padding: 30px 20px;
    border-radius: 12px;
    background-color: var(--light-gray);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.customer-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 4px;
    background: var(--red);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease;
}

.customer-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.customer-item:hover::before {
    transform: scaleY(1);
}

.customer-item:hover {
    background-color: var(--dark-steel);
    color: var(--white);
}

.customer-item:hover .icon {
    color: var(--red);
    transform: scale(1.1);
}

.customer-item .icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--dark-steel);
    transition: all 0.3s ease;
}

.customer-item h3 {
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* CTA Section */
.cta {
    background: var(--gradient-bg);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

.cta::before {
    content: '';
    position: absolute;
    top: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(231, 76, 60, 0.15), transparent 70%);
    border-radius: 50%;
}

.cta::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(231, 76, 60, 0.15), transparent 70%);
    border-radius: 50%;
}

.cta .container {
    position: relative;
    z-index: 2;
}

.cta h2 {
    font-size: 36px;
    margin-bottom: 25px;
    font-weight: 700;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

.cta p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 20px;
    line-height: 1.6;
    opacity: 0.9;
}

.cta-text {
    font-weight: bold;
    font-size: 22px !important;
    margin-bottom: 35px !important;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background-color: #131F2C;
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo h3 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-logo h3 span {
    color: var(--red);
}

.footer-logo p {
    color: var(--light-gray);
    margin-bottom: 8px;
    font-size: 15px;
    opacity: 0.85;
}

.footer-col h3 {
    margin-bottom: 25px;
    font-size: 20px;
    color: var(--white);
    font-weight: 600;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--red);
    bottom: 0;
    left: 0;
}

.footer-col ul li, 
.footer-col address p {
    margin-bottom: 15px;
    color: var(--light-gray);
    opacity: 0.85;
    transition: all 0.3s ease;
    padding-left: 5px;
}

.footer-col ul li:hover,
.footer-col address p:hover {
    padding-left: 8px;
    opacity: 1;
}

.footer-col address p i {
    margin-right: 12px;
    color: var(--red);
}

.footer-col a {
    transition: all 0.3s ease;
}

.footer-col a:hover {
    color: var(--red);
}

.copyright {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--dark-gray);
    font-size: 14px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    overflow-y: auto;
    padding: 40px 0;
}

.modal-content {
    background-color: var(--white);
    margin: 0 auto;
    width: 90%;
    max-width: 800px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-button:hover {
    color: var(--red);
}

/* Form Styles */
#quoteForm {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form-row .form-group {
    flex: 1 1 250px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-steel);
    font-size: 15px;
}

.required {
    color: var(--red);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    color: #333;
    background-color: #f9f9f9;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
    background-color: var(--white);
}

input.error,
select.error,
textarea.error {
    border-color: var(--red);
    background-color: rgba(231, 76, 60, 0.05);
}

@keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
    20%, 40%, 60%, 80% {transform: translateX(5px);}
}

.shake {
    animation: shake 0.5s ease;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23444444%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
    margin-top: 4px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 14px;
}

.submit-group {
    margin-top: 30px;
    text-align: center;
}

.submit-btn {
    width: auto;
    min-width: 180px;
}

#form-message {
    margin-top: 15px;
    font-weight: 600;
    min-height: 24px;
}

#form-message.success {
    color: #2ecc71;
}

#form-message.error {
    color: var(--red);
}

#form-message.pending {
    color: #3498db;
}

/* Responsive Design */
@media (max-width: 992px) {
    .customer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: 70px 0;
    }
    
    .hero {
        padding: 150px 0 80px;
        background-position: center center;
    }
    
    .hero h2 {
        font-size: 36px;
    }
    
    .hero h3 {
        font-size: 20px;
    }
    
    .services h2,
    .customers h2 {
        font-size: 30px;
        margin-bottom: 15px;
    }
    
    .section-subtext {
        margin-bottom: 30px;
        font-size: 15px;
    }
    
    .menu-toggle {
        display: block;
        font-size: 26px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        background-color: var(--dark-steel);
        width: 100%;
        flex-direction: column;
        text-align: center;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
        z-index: 999;
        padding: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .nav-menu a:not(.btn-small):after {
        display: none;
    }
    
    .nav-menu a.btn-small {
        margin: 15px auto;
        width: 80%;
    }
    
    .cta h2 {
        font-size: 28px;
    }
    
    .cta p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 28px;
    }
    
    .service-item, .customer-item {
        padding: 25px 20px;
    }
    
    .cta {
        padding: 70px 0;
    }
    
    .cta h2 {
        font-size: 24px;
    }
    
    .cta p {
        font-size: 16px;
    }
    
    .btn {
        padding: 12px 24px;
    }
    
    .customer-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Form Optimization - Enhanced Mobile Styles */
@media (max-width: 768px) {
    .modal {
        padding: 0;
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 2000;
        overflow-y: auto;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 15px 15px 0 0;
        padding: 30px 20px;
        margin: 0;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 90vh;
        overflow-y: auto;
        transform: translateY(0);
        animation: slideUpModal 0.3s ease;
    }
    
    @keyframes slideUpModal {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .modal h2 {
        font-size: 24px;
        padding-right: 25px;
        margin-bottom: 10px;
    }
    
    .modal p {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .close-button {
        top: 20px;
        right: 20px;
        font-size: 28px;
    }
    
    /* Create full-width form fields on mobile */
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .form-row .form-group {
        flex: none;
        width: 100%;
        margin-bottom: 0;
    }
    
    /* Increase tap target sizes for better mobile usability */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        padding: 15px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        height: auto;
    }
    
    /* Make labels more prominent */
    label {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    /* Make submit button wider */
    .submit-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    /* Adjust checkbox alignment */
    .checkbox-group {
        align-items: center;
    }
    
    .checkbox-group input {
        width: 20px;
        height: 20px;
        margin-top: 0;
    }
    
    .checkbox-group label {
        font-size: 15px;
        line-height: 1.4;
    }
    
    /* Better spacing between form groups */
    .form-group {
        margin-bottom: 24px;
    }
    
    /* Adjust select dropdown arrow position */
    select {
        background-position: right 20px center;
    }
    
    #form-message {
        min-height: 40px;
        word-wrap: break-word;
    }
}

/* Small Mobile Optimization */
@media (max-width: 480px) {
    .modal-content {
        padding: 25px 15px 30px;
    }
    
    .modal h2 {
        font-size: 22px;
        padding-right: 30px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        padding: 14px;
    }
}

/* Fix iOS-specific issues */
@supports (-webkit-overflow-scrolling: touch) {
    /* Prevent zoom on iOS input focus */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px;
    }
    
    /* Fix iOS modal scrolling issues */
    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix checkbox appearance on iOS */
    input[type="checkbox"] {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border: 1px solid #ddd;
        border-radius: 3px;
        background-color: #f9f9f9;
        position: relative;
        cursor: pointer;
    }
    
    input[type="checkbox"]:checked::after {
        content: '✓';
        position: absolute;
        top: 0;
        left: 5px;
        color: var(--red);
        font-size: 14px;
    }
}