:root {
    --primary: #035A96; /* Azul Oscuro del Logo */
    --primary-hover: #024370;
    --secondary: #F37021; /* Naranja Vibrante del Logo */
    --secondary-hover: #d25f1c;
    --dark: #1F2937;
    --light: #ffffff;
    --bg-color: #F9FAFB;
    --border-color: #E5E7EB;
    --text-main: #374151;
    --text-muted: #6B7280;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 1.05rem;
    transition: var(--transition);
    position: relative;
}

nav a:hover {
    color: var(--secondary);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -6px;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
    border-radius: 2px;
}

nav a:hover::after {
    width: 100%;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--light);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: 2px solid var(--secondary);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(243, 112, 33, 0.3);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--light);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--light);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.btn-secondary:hover {
    background-color: var(--light);
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(to right, rgba(3, 90, 150, 0.9), rgba(3, 90, 150, 0.6)), url('obra_blanca_bg.png') center/cover;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--light);
    padding: 0 10%;
    margin-top: 0;
}

.badge {
    background: rgba(243, 112, 33, 0.15);
    color: var(--secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: inline-block;
    border: 1px solid rgba(243, 112, 33, 0.4);
}

.hero-content {
    max-width: 700px;
    animation: fadeInUp 1s ease-out;
}

.hero-content h2 {
    font-size: 4.5rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content h2 strong {
    color: var(--light);
    font-weight: 800;
}

.hero-content p {
    font-size: 1.6rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: #E5E7EB;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

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

/* Sub-sections common */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    font-weight: 800;
}

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

.section-title p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 650px;
    margin: 1.5rem auto 0;
}

/* Services */
.services, .gallery-section, .reviews-section {
    padding: 100px 5%;
}

.services {
    background-color: var(--light);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--bg-color);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--secondary);
    transform: scaleX(0);
    origin: left;
    transition: transform 0.4s ease;
}

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

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(3, 90, 150, 0.08);
    background: var(--light);
    border-color: transparent;
}

.card i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 2rem;
    background: rgba(3, 90, 150, 0.05);
    width: 90px;
    height: 90px;
    line-height: 90px;
    border-radius: 50%;
    display: inline-block;
    transition: var(--transition);
}

.card:hover i {
    background: var(--primary);
    color: var(--light);
    transform: rotateY(180deg);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 700;
}

.card p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Gallery / Products */
.gallery-section {
    background-color: var(--bg-color);
}

.upload-area {
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.upload-box {
    border: 2px dashed var(--primary);
    border-radius: 20px;
    padding: 3.5rem 2rem;
    text-align: center;
    background: rgba(3, 90, 150, 0.02);
    cursor: pointer;
    transition: var(--transition);
}

.upload-box:hover {
    background: rgba(3, 90, 150, 0.05);
    transform: scale(1.02);
    border-color: var(--secondary);
}

.upload-box i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-box:hover i {
    color: var(--secondary);
}

.upload-box p {
    font-size: 1.3rem;
    color: var(--dark);
    font-weight: 600;
}

.upload-box span {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    aspect-ratio: 4 / 3;
    background: #e5e7eb;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3, 90, 150, 0.8), transparent);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Reviews */
.reviews-section {
    background-color: var(--light);
}

.reviews-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.review-form-card {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    height: fit-content;
    border: 1px solid var(--border-color);
}

.review-form-card h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.8rem;
}

.stars {
    display: flex;
    gap: 0.5rem;
    font-size: 1.8rem;
    color: #D1D5DB;
    margin-bottom: 2rem;
    cursor: pointer;
}

.stars i.active {
    color: #FBBF24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

form input, form textarea {
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 1rem;
    background: var(--light);
    transition: var(--transition);
}

form input:focus, form textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(243, 112, 33, 0.1);
}

form button {
    width: 100%;
    justify-content: center;
    font-size: 1.1rem;
    padding: 1rem;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-item {
    background: var(--light);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    border-left: 6px solid var(--secondary);
    position: relative;
    border: 1px solid var(--border-color);
    border-left: 6px solid var(--secondary);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.reviewer-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.reviewer-info h4 {
    color: var(--dark);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.star-display i {
    color: #FBBF24;
    font-size: 1rem;
    margin-right: 0.2rem;
}

.review-item p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: var(--light);
    padding: 80px 5% 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 4rem;
    margin-bottom: 2rem;
}

.footer-brand h2 {
    font-size: 2.5rem;
    color: var(--light);
    margin-bottom: 1.5rem;
}

.footer-brand h2 span {
    color: var(--secondary);
}

.footer-brand p {
    color: #D1D5DB;
    font-size: 1.1rem;
}

.footer-links h3, .footer-social h3 {
    margin-bottom: 2rem;
    font-size: 1.4rem;
    color: var(--secondary);
}

.footer-links p {
    margin-bottom: 1.2rem;
    color: #D1D5DB;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.footer-links a {
    color: #D1D5DB;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--light);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--light);
    text-decoration: none;
    margin-right: 1rem;
    font-size: 1.3rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    color: #9CA3AF;
    font-size: 1rem;
}

/* Floating Chat */
.floating-chat {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
}

.chat-trigger {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(243, 112, 33, 0.4);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-trigger:hover {
    transform: scale(1.1);
}

.chat-bubble {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 350px;
    background: var(--light);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.chat-bubble.active {
    transform: scale(1);
}

.chat-header {
    background-color: var(--primary);
    color: white;
    padding: 1.2rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

#closeChat {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
}

#closeChat:hover {
    transform: rotate(90deg);
}

.chat-body {
    padding: 1.5rem;
    background: var(--bg-color);
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.bot-msg, .user-msg {
    max-width: 85%;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease-out;
}

.bot-msg {
    background: var(--light);
    align-self: flex-start;
    border-top-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.user-msg {
    background: var(--secondary);
    color: var(--light);
    align-self: flex-end;
    border-top-right-radius: 2px;
    box-shadow: 0 2px 5px rgba(243, 112, 33, 0.2);
}

.chat-footer {
    display: flex;
    padding: 1.2rem;
    background: var(--light);
    gap: 0.8rem;
    border-top: 1px solid var(--border-color);
}

.chat-footer input {
    flex: 1;
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    background: var(--bg-color);
    font-family: var(--font-main);
    transition: var(--transition);
}

.chat-footer input:focus {
    outline: none;
    border-color: var(--secondary);
}

.chat-footer button {
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.chat-footer button:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

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

@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 3rem;
    }
    .reviews-container {
        grid-template-columns: 1fr;
    }
    nav {
        display: none; /* Consider implementing a hamburger menu for production */
    }
    .hero {
        padding-top: 80px;
    }
}
