/* 
    HOJA DE ESTILOS PRINCIPAL - WebCraft Solutions
    Autor: [Tu Nombre]
    Fecha: [Fecha Actual]
    
    Variables CSS personalizadas para colores, tipografía y espaciado
    Diseño responsive mobile-first
    Sistema de grid para layouts flexibles
    Transiciones y efectos para mejor UX
*/
:root {
    --primary-color: #0066cc;
    --secondary-color: #003366;
    --accent-color: #ff6600;
    --light-color: #f8f9fa;
    --dark-color: #333333;
    --text-color: #444444;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--heading-font);
    font-weight: 600;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
}

.logo-icon {
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 1.2rem;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.logo span {
    color: var(--accent-color);
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 25px;
}

.nav-link {
    font-family: var(--heading-font);
    font-weight: 600;
    color: var(--dark-color);
    padding: 8px 0;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link i {
    margin-right: 8px;
    font-size: 0.9rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    padding-right: 40px;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.hero-image {
    flex: 1;
    min-width: 300px;
}

.hero-img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.services {
    padding: 80px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

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

.service-card {
    background-color: var(--light-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 1.8rem;
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.1);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.about {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.about .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.about-content {
    flex: 1;
    min-width: 300px;
    padding-right: 40px;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.about-list {
    list-style: none;
    margin-top: 20px;
}

.about-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.about-list i {
    color: var(--accent-color);
    margin-right: 10px;
}

.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 60px 0 30px;
}

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

.footer-section h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-section p {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.footer-section i {
    margin-right: 10px;
    color: var(--accent-color);
    margin-top: 3px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cccccc;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

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

.legal-link {
    color: #cccccc;
    margin: 0 10px;
}

.legal-link:hover {
    color: white;
}

.portfolio-main {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.page-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 50px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 51, 102, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-link {
    color: white;
    background-color: var(--accent-color);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
}

.portfolio-link:hover {
    background-color: #ff8533;
    color: white;
}

.portfolio-info {
    padding: 25px;
}

.portfolio-info h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.portfolio-info p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.portfolio-tech span {
    background-color: var(--light-color);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.producto-precio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.precio {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-producto {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-producto:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.budget-main {
    padding: 80px 0;
}

.budget-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.budget-form-container {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.budget-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--body-font);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.form-group.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-group.checkbox label {
    margin-bottom: 0;
    font-weight: normal;
}

.contact-main {
    padding: 80px 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-details {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-icon {
    background: #0066cc;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-text h3 {
    margin: 0 0 5px 0;
    color: #333;
}

.contact-text p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.map-container {
    margin-top: 30px;
}

.map-wrapper {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.map-wrapper iframe {
    display: block;
    width: 100%;
    height: 400px;
    border: none;
}

.map-note {
    text-align: center;
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}

.contact-form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.contact-form .form-group input,
.contact-form .form-group select,
.contact-form .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
}

.contact-form .form-group input:focus,
.contact-form .form-group select:focus,
.contact-form .form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
}

.contact-form .checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-form .checkbox input {
    width: auto;
}

.contact-form .checkbox label {
    margin-bottom: 0;
    font-weight: normal;
}

.privacy-link {
    color: #0066cc;
    text-decoration: underline;
}

.privacy-link:hover {
    color: #ff6600;
}

.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: white;
    border-radius: 12px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
    z-index: 2001;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #0066cc 0%, #003366 100%);
    border-radius: 12px 12px 0 0;
    color: white;
}

.modal-title {
    margin: 0;
    color: white;
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 30px;
}

.modal-product-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.modal-product-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-tag {
    background-color: #e7f0ff;
    color: #0066cc;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #cce0ff;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.spec-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
    display: flex;
    flex-direction: column;
}

.spec-key {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.spec-value {
    color: #0066cc;
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0066cc;
}

.modal-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 200px;
    padding: 14px 20px;
    font-size: 1.1rem;
}

@media (max-width: 992px) {
    .hero .container,
    .about .container {
        flex-direction: column;
    }
    
    .hero-content,
    .about-content {
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
    }
    
    .budget-container,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .modal-product-image img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-item {
        margin: 0 0 15px 0;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .hero,
    .services,
    .about,
    .portfolio-main,
    .budget-main,
    .contact-main {
        padding: 60px 0;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .producto-precio {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-producto {
        width: 100%;
        text-align: center;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-product-image img {
        height: 250px;
    }
}