:root {
    --primary-color: #ff8c00; /* Amber/Orange - Fire/Sparks */
    --primary-dark: #e67e00;
    --secondary-color: #2c3e50; /* Dark Blue/Gray - Steel */
    --bg-dark: #1a1a1a;
    --bg-light: #f4f4f4;
    --text-light: #f4f4f4;
    --text-dark: #333333;
    --glass-overlay: rgba(0, 0, 0, 0.6);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border-color: white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--text-dark);
}

/* Header */
#main-header {
    background-color: var(--bg-dark);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.metal-text {
    color: #b0c4de;
}

.glass-text {
    color: var(--primary-color);
}

#main-nav ul {
    display: flex;
    align-items: center;
}

#main-nav li {
    margin-left: 2rem;
}

#main-nav a {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ddd;
}

#main-nav a:hover, #main-nav a.active {
    color: var(--primary-color);
}

.btn-cta {
    background-color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 4px;
    color: white !important;
}

.btn-cta:hover {
    background-color: var(--primary-dark);
}

/* Hamburger Menu (Hidden by default) */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: white;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero */
#hero {
    height: 80vh;
    background: linear-gradient(var(--glass-overlay), var(--glass-overlay)), url('https://images.unsplash.com/photo-1504328345606-18bbc8c9d7d1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80'); /* Welding sparks image */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons .btn {
    margin: 0 10px;
}

/* Services */
#servicios {
    padding: 80px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--secondary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: #f9f9f9;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-bottom-color: var(--primary-color);
}

.service-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* Gallery */
#galeria {
    padding: 80px 0;
    background-color: var(--bg-dark);
    color: white;
}

#galeria .section-title {
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 15px;
}

.gallery-item {
    background-color: #333;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
}

/* Real images from LoremFlickr (Reliable placeholders) */
.item1 { grid-column: 1 / 3; grid-row: 1 / 3; background: url('https://loremflickr.com/800/600/gate,metal/all') center/cover no-repeat; }
.item2 { grid-column: 3 / 5; grid-row: 1 / 2; background: url('https://loremflickr.com/800/600/window,glass/all') center/cover no-repeat; }
.item3 { grid-column: 3 / 4; grid-row: 2 / 3; background: url('https://loremflickr.com/800/600/railing,stairs/all') center/cover no-repeat; }
.item4 { grid-column: 4 / 5; grid-row: 2 / 3; background: url('https://loremflickr.com/800/600/roof,structure/all') center/cover no-repeat; }

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 140, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item h4 {
    color: white;
    font-size: 1.5rem;
    transform: translateY(20px);
    transition: var(--transition);
}

.gallery-item:hover h4 {
    transform: translateY(0);
}

/* Contact */
#contacto {
    padding: 80px 0;
    background-color: #f4f4f4;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: white;
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-info h2 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.contact-info ul {
    margin-top: 2rem;
}

.contact-info li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-check {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.form-check input {
    margin-right: 10px;
}

.form-check a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #111;
    color: #aaa;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 0.9rem;
}

/* Legal Pages Styling */
.legal-page {
    padding: 60px 0;
    background: white;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h1 {
    margin-bottom: 2rem;
    color: var(--secondary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.legal-content p, .legal-content ul {
    margin-bottom: 1rem;
    color: #555;
    text-align: justify;
}

.legal-content ul {
    padding-left: 20px;
    list-style-type: disc;
}

/* Animations */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Responsive */
@media (max-width: 768px) {
    #main-header .container {
        /* Keep flex-direction row for logo and hamburger to be side-by-side */
        flex-direction: row; 
    }
    
    .hamburger {
        display: block;
    }

    #main-nav ul {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #1a1a1a;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
    }
    
    #main-nav ul.active {
        left: 0;
    }
    
    #main-nav li {
        margin: 1.5rem 0;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .item1, .item2, .item3, .item4 {
        grid-column: auto;
        grid-row: auto;
        height: 250px;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}
