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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #334155;
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(30, 41, 59, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #3b82f6;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '🏗️';
    font-size: 1.8rem;
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    position: relative;
}

.nav-menu a:hover {
    color: #3b82f6;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

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

.nav-menu a:hover::after {
    width: 80%;
}

.contact-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    padding: 0.7rem 1.5rem !important;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Main Content */
.main-content {
    margin-top: 80px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.8) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="architecture" patternUnits="userSpaceOnUse" width="100" height="100"><rect width="100" height="100" fill="rgba(59,130,246,0.05)"/><path d="M20,20 L80,20 L80,80 L20,80 Z" fill="none" stroke="rgba(59,130,246,0.1)" stroke-width="1"/><circle cx="50" cy="50" r="15" fill="none" stroke="rgba(59,130,246,0.08)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23architecture)"/></svg>');
    color: white;
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="10" y="10" width="30" height="80" fill="none" stroke="rgba(59,130,246,0.1)" stroke-width="0.5"/><rect x="50" y="20" width="40" height="60" fill="none" stroke="rgba(59,130,246,0.08)" stroke-width="0.5"/><circle cx="25" cy="25" r="3" fill="rgba(59,130,246,0.1)"/></svg>');
    animation: architecturalFloat 30s infinite linear;
}

@keyframes architecturalFloat {
    0% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-30px) translateX(20px); }
    50% { transform: translateY(-15px) translateX(-10px); }
    75% { transform: translateY(-40px) translateX(30px); }
    100% { transform: translateY(0px) translateX(0px); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.8rem;
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 2px solid #3b82f6;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

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

/* Services Section */
.services {
    padding: 8rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.3rem;
    color: #64748b;
    margin-bottom: 5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.service-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.15);
    background: white;
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    display: block;
    color: #3b82f6;
}

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-weight: 600;
}

.service-card p {
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.service-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.service-features li {
    color: #475569;
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 25px;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: bold;
}

.service-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.service-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Portfolio Section */
.portfolio {
    padding: 8rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

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

.portfolio-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(30, 41, 59, 0.1);
    transition: all 0.4s ease;
    position: relative;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(30, 41, 59, 0.2);
}

.portfolio-image {
    height: 250px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #64748b;
    position: relative;
    overflow: hidden;
}

.portfolio-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="20" y="20" width="60" height="40" fill="none" stroke="rgba(59,130,246,0.1)" stroke-width="1"/><rect x="30" y="70" width="40" height="20" fill="none" stroke="rgba(59,130,246,0.08)" stroke-width="1"/></svg>');
}

.portfolio-content {
    padding: 2.5rem;
}

.portfolio-category {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
}

.portfolio-item p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.portfolio-specs {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.portfolio-specs h4 {
    color: #3b82f6;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.specs-grid span {
    color: #475569;
}

/* Contact Calculator */
.contact-calculator {
    padding: 8rem 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
}

.calculator-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 4rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group textarea {
    resize: vertical;
    height: 120px;
}

/* Chatbot */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    animation: architecturalPulse 3s infinite;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.6);
}

@keyframes architecturalPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(59, 130, 246, 0.8); }
}

.chatbot-widget {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 520px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.chatbot-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: bold;
    position: relative;
}

.chatbot-header::after {
    content: '🏗️ Consultor Arquitectónico Especializado';
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 0.2rem;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8fafc;
}

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

.message.bot {
    flex-direction: row;
}

.message.user {
    flex-direction: row-reverse;
}

.message-content {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.bot .message-content {
    background: rgba(59, 130, 246, 0.1);
    color: #1e293b;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.message.user .message-content {
    background: #3b82f6;
    color: white;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.message.user .message-avatar {
    background: #64748b;
    color: white;
}

.chatbot-input {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    background: white;
    display: flex;
    gap: 0.5rem;
}

.chatbot-input input {
    flex: 1;
    padding: 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    outline: none;
    color: #334155;
}

.chatbot-input input:focus {
    border-color: #3b82f6;
}

.chatbot-input button {
    padding: 0.7rem 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-input button:hover {
    background: #2563eb;
}

/* Footer */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 4rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: #3b82f6;
    font-weight: 600;
}

.footer-section p,
.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3b82f6;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    text-align: center;
    color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-container {
        margin: 0 1rem;
        padding: 2rem 1rem;
    }
    
    .chatbot-widget {
        width: 320px;
        height: 450px;
    }
    
    .container {
        padding: 0 1rem;
    }
}