/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ELIMINAR BARRAS AZULES - SCROLLBARS Y SELECCIÓN */
::-webkit-scrollbar {
    display: none;
}

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

::selection {
    background: rgba(255, 107, 53, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(255, 107, 53, 0.3);
    color: #ffffff;
}

/* Eliminar outline azul en elementos enfocados */
*:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.5) !important;
}

/* Eliminar highlight azul en elementos clickeables */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Permitir selección de texto solo donde sea necesario */
p, span, h1, h2, h3, h4, h5, h6 {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

:root {
    --primary-color: #ff6b35;
    --secondary-color: #e55a2b;
    --accent-color: #ffd700;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #ffffff;
    --text-secondary: #adb5bd;
    --background: #000000;
    --surface: #1a1a1a;
    --surface-light: #2c2c2c;
    --border: #404040;
    --shadow: rgba(255, 107, 53, 0.2);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Language Toggle Button */
.language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-btn {
    background: var(--gradient);
    border: none;
    border-radius: 50px;
    padding: 12px 16px;
    color: var(--background);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px var(--shadow);
    min-width: 70px;
    justify-content: center;
}

.language-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow);
    background: var(--secondary-color);
}

/* Back Button */
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-btn {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 100px;
    justify-content: center;
}

.back-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    box-shadow: 0 8px 25px var(--shadow);
}

/* Background Shapes */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient);
    opacity: 0.05;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: -75px;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Main Container */
.main-container {
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
    margin-top: 80px;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary-color);
}

/* Profile Section */
.profile-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.profile-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    position: relative;
    cursor: pointer;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    border-radius: 50%;
}

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

.agency-name {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.agency-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Section */
.filter-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient);
    border-color: var(--primary-color);
    color: var(--background);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow);
}

/* Projects Section */
.projects-section {
    margin-bottom: 3rem;
}

.project-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.project-item:nth-child(1) { animation-delay: 0.1s; }
.project-item:nth-child(2) { animation-delay: 0.2s; }
.project-item:nth-child(3) { animation-delay: 0.3s; }
.project-item:nth-child(4) { animation-delay: 0.4s; }
.project-item:nth-child(5) { animation-delay: 0.5s; }
.project-item:nth-child(6) { animation-delay: 0.6s; }

.project-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 40px var(--shadow);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

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

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--background);
}

.project-badge.industrial {
    background: var(--error-color);
}

.project-badge.comercial {
    background: var(--primary-color);
}

.project-badge.residencial {
    background: var(--success-color);
}

.project-badge.solar {
    background: var(--accent-color);
    color: var(--background);
}

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

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

.view-btn {
    background: var(--gradient);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    color: var(--background);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px var(--shadow);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-meta {
    margin-bottom: 1rem;
}

.project-details {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.project-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.stars i {
    color: var(--accent-color);
    font-size: 0.875rem;
}

.rating-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--surface-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Contact Section */
.contact-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.contact-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.contact-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 180px;
    justify-content: center;
}

.contact-btn.whatsapp {
    background: #25D366;
    color: white;
}

.contact-btn.phone {
    background: var(--gradient);
    color: var(--background);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
    text-decoration: none;
    color: inherit;
}

/* Social Section */
.social-section {
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.social-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--border);
    background: var(--surface);
}

.social-link i {
    font-size: 1.25rem;
}

.social-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow);
    text-decoration: none;
}

/* Social Media Colors */
.instagram { color: #e4405f; }
.instagram:hover { background: #e4405f; color: var(--background); border-color: #e4405f; }

.facebook { color: #1877f2; }
.facebook:hover { background: #1877f2; color: var(--background); border-color: #1877f2; }

.linkedin { color: #0077b5; }
.linkedin:hover { background: #0077b5; color: var(--background); border-color: #0077b5; }

.tiktok { color: var(--text-primary); }
.tiktok:hover { background: var(--text-primary); color: var(--background); border-color: var(--text-primary); }

.contact-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.contact-info i {
    color: var(--primary-color);
}

.contact-info a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-info a:hover {
    color: var(--primary-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: var(--surface);
    margin: 2% auto;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 0.4s ease-out;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-image {
    margin-bottom: 1.5rem;
}

.modal-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
}

.modal-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.detail-item {
    background: var(--surface-light);
    padding: 1rem;
    border-radius: 8px;
}

.detail-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.detail-item span {
    color: var(--text-secondary);
}

.modal-gallery h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.gallery-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--border);
    text-align: center;
}

.modal-btn {
    background: var(--gradient);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    color: var(--background);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
}

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

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Animation */
.project-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
}

.project-item.visible {
    opacity: 1;
    transform: scale(1);
    transition: var(--transition);
}

/* Language Transition Animation */
.language-transition {
    opacity: 0.7;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.language-transition.complete {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 575.98px) {
    .main-container {
        padding: 1.5rem 0.5rem;
        margin-top: 70px;
    }
    
    .agency-name {
        font-size: 2rem;
    }
    
    .stats {
        gap: 1.5rem;
    }
    
    .filter-buttons {
        gap: 0.25rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .project-content {
        padding: 1.25rem;
    }
    
    .project-image {
        height: 200px;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-btn {
        min-width: 200px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-details {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .back-button,
    .language-toggle {
        top: 15px;
    }
    
    .back-button {
        left: 15px;
    }
    
    .language-toggle {
        right: 15px;
    }
}

@media (max-width: 479.98px) {
    .agency-name {
        font-size: 1.75rem;
    }
    
    .stats {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .project-details {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Tablet y Desktop */
@media (min-width: 768px) {
    .main-container {
        padding: 3rem 2rem;
        margin-top: 100px;
    }
    
    .agency-name {
        font-size: 3rem;
    }
    
    .stats {
        gap: 3rem;
    }
    
    .project-image {
        height: 280px;
    }
}

@media (min-width: 992px) {
    .main-container {
        padding: 4rem 2rem;
    }
    
    .project-image {
        height: 300px;
    }
}