/* ===================================
   FERRETERÍA PROFESIONAL - CSS STYLES
   =================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #64748b;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    /* color: #1e3a8a; */
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 800;
    line-height: 1.1;
}

h2 {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.2;
}

h3 {
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 600;
}

p {
    font-size: 18px;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #f97316;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #1e3a8a;
    border: 2px solid #1e3a8a;
}

.btn-secondary:hover {
    background: #1e3a8a;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    font-size: 18px;
    color: #64748b;
    margin-top: 0.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Header / Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1e3a8a;
}

.nav-logo i {
    font-size: 24px;
    color: #f97316;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #f97316;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: #f97316;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #1e3a8a;
    margin: 3px 0;
    transition: 0.3s;
}

.logo-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/LogoSF.png') center/cover no-repeat;
    z-index: -2;
}



/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: url('../images/P_INI.jpg') center/cover no-repeat;
     z-index: -2; */
}

.hero-uno {
	background-image:
    linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(30, 58, 138, 0.4)), /* Degradado */
    url('../images/P_INI.jpg'); /* Imagen de fondo */
	/* position: absolute; */
    /* top: 0;
    left: 0; */
    width: 100%;
    height: 100%;
}


.hero-dos {
  /*   background-image: url('../images/P_SEG_IND.jpeg') center/cover no-repeat; */
	background-image:
    linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(30, 58, 138, 0.4)), /* Degradado */
    url('../images/P_SEG_IND.jpeg'); /* Imagen de fondo */
	position: absolute;
    /* top: 0;
    left: 0; */
    width: 100%;
    height: 100%;
	display: flex;
  }
  
  .hero-tres {
  /*   background-image: url('../images/P_SEG_IND.jpeg') center/cover no-repeat; */
	background-image:
    linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(30, 58, 138, 0.4)), /* Degradado */
    url('../images/P_ACERO_EST.jpeg'); /* Imagen de fondo */
	position: absolute;
    /* top: 0;
    left: 0; */
    width: 100%;
    height: 100%;
	display: block;
  }

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
   /*  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(30, 58, 138, 0.4));  /*el primer 0.4 es transparencia, ambos son para transparencia*/
    /* z-index: -1; */
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 2rem 0;
}

.hero h1 {
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 600;
    color: #f97316;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 24px;
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    color: #ffffff;
    text-decoration: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* About Section */
.about {
    padding: 80px 0;
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.about-stats {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #f97316;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.about-features {
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature i {
    font-size: 24px;
    color: #f97316;
    margin-top: 0.25rem;
}

.feature-content h4 {
    font-size: 18px;
    margin-bottom: 0.5rem;
}

.feature-content p {
    font-size: 16px;
    margin: 0;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: #ffffff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.service-icon {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon img {
    transform: scale(1.1);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .service-overlay {
    opacity: 1;
}

.service-overlay i {
    font-size: 48px;
    color: #f97316;
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.service-content p {
    font-size: 16px;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 14px;
}

.service-features i {
    color: #f97316;
    font-size: 12px;
}

/* Brands Section */
.brands {
    padding: 80px 0;
    background: #f8f9fa;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.brand-card {
    background: #ffffff;
    padding: 0.1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.brand-logo {
    margin-bottom: 0.1rem;
}

.brand-logo i {
    font-size: 48px;
    color: #f97316;
    margin-bottom: 1rem;
}

.brand-logo h3 {
    font-size: 20px;
    color: #1e3a8a;
    margin: 0;
}

.brand-card p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #ffffff;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.contact-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: #f97316;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: #ffffff;
    font-size: 20px;
}

.contact-details h4 {
    font-size: 16px;
    margin-bottom: 0.5rem;
    color: #1e3a8a;
}

.contact-details p {
    font-size: 14px;
    margin: 0;
    color: #64748b;
}

/* Contact Form */
.contact-form-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.contact-form-card h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group label {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #64748b;
    font-weight: 600;
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 16px;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -8px;
    left: 8px;
    background: #ffffff;
    padding: 0 4px;
    font-size: 12px;
    color: #1e3a8a;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Map Section */
.map-section {
    margin-top: 4rem;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    background: #1e3a8a;
    color: #ffffff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 24px;
    color: #f97316;
}

.footer-section h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #f97316;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: #f97316;
    transform: translateY(-2px);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-contact a {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #f97316;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: #cbd5e1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #1e3a8a;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #64748b;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #f97316;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h4 {
    color: #1e3a8a;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.modal-body ul {
    margin-left: 1rem;
    margin-bottom: 1rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #f97316;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.back-to-top.visible {
    display: flex;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Hero */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        position: static;
        margin-top: 1rem;
        justify-content: center;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Typography */
    p {
        font-size: 16px;
    }

    .hero-description {
        font-size: 18px;
    }

    /* Sections */
    .about, .services, .brands, .contact {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .services-grid,
    .brands-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        gap: 0.5rem;
    }

    .about-stats {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Loading Animation */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f97316;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
