/* ============================================
   Variables y Configuración Global
   ============================================ */
:root {
    --primary-color: #1a5f7a;
    --secondary-color: #2c8f8f;
    --accent-color: #f4a261;
    --dark-color: #264653;
    --light-color: #e9ecef;
    --success-color: #2a9d8f;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
}

/* ============================================
   Estilos Generales
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ============================================
   Navbar Sticky
   ============================================ */
.navbar {
    background-color: var(--primary-color) !important;
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white) !important;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.navbar-logo-img {
    height: 90px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
    display: block;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

.navbar .btn-primary {
    background-color: var(--accent-color);
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar .btn-primary:hover {
    background-color: #e76f51;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.4);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
}

.hero-carousel .owl-stage-outer {
    height: 100vh;
    overflow: hidden;
}

.hero-carousel .owl-stage {
    height: 100vh;
    display: flex;
}

.hero-carousel .owl-item {
    height: 100vh;
    width: 100%;
}

.hero-slide {
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(26, 95, 122, 0.85) 0%, rgba(44, 143, 143, 0.85) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero-section p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1.2s ease;
}

.hero-cta {
    animation: fadeInUp 1.4s ease;
}

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

.btn-primary {
    background-color: var(--accent-color);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #e76f51;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.4);
}

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

/* ============================================
   Section Titles
   ============================================ */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Features Section
   ============================================ */
#services {
    padding: 80px 0;
}

.feature-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--accent-color);
}

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

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   Products Section
   ============================================ */
#products {
    padding: 80px 0;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

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

.product-card-body {
    padding: 1.5rem;
}

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

.product-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   How It Works Section
   ============================================ */
#how-it-works {
    padding: 80px 0;
}

.step-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--accent-color);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.step-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
}

.step-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.step-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Responsive adjustments for How It Works */
.how-it-works-first-row {
    margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
    .how-it-works-first-row {
        margin-bottom: 1rem;
    }
    
    #how-it-works-container .row.justify-content-center {
        margin-top: 0;
    }
    
    #how-it-works-container .col-md-6 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .how-it-works-first-row {
        margin-bottom: 0;
    }
    
    #how-it-works-container .col-md-4,
    #how-it-works-container .col-md-6 {
        margin-bottom: 1rem;
    }
    
    #how-it-works-container .col-md-4:last-child,
    #how-it-works-container .col-md-6:last-child {
        margin-bottom: 0;
    }
}

/* ============================================
   History Section
   ============================================ */
#history {
    padding: 80px 0;
}

.history-image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 100%;
    min-height: 400px;
}

.history-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.history-content {
    padding: 2rem 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.history-paragraph {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.history-paragraph:last-of-type {
    margin-bottom: 2rem;
}

.history-nit {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--light-color);
    color: var(--text-dark);
    font-size: 1.1rem;
}

.history-nit strong {
    color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 992px) {
    .history-image-container {
        min-height: 300px;
        margin-bottom: 2rem;
    }
    
    .history-content {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .history-content {
        padding: 0;
    }
    
    .history-paragraph {
        font-size: 1rem;
        text-align: left;
    }
    
    .history-image-container {
        min-height: 250px;
    }
}

/* ============================================
   FAQ Section
   ============================================ */
#faq {
    padding: 80px 0;
}

.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.accordion-button {
    background-color: var(--white);
    color: var(--primary-color);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border: none;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: var(--white);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-body {
    padding: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   Final CTA Section
   ============================================ */
#final-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 80px 0;
}

#final-cta .btn-light {
    background-color: var(--white);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 2.5rem;
    transition: all 0.3s ease;
}

#final-cta .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* ============================================
   Contact Section
   ============================================ */
#contact {
    padding: 80px 0;
}

.contact-info h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--accent-color);
    font-size: 1.3rem;
    width: 30px;
}

.contact-item span {
    color: var(--text-light);
}

.contact-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.contact-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.contact-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.contact-card-link:hover .contact-card {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.contact-card h5 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
}

.contact-card p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

#contact-form .form-control {
    border: 2px solid var(--light-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

#contact-form .form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(244, 162, 97, 0.25);
}

.map-container {
    width: 100%;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.google-map {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 15px;
}

/* ============================================
   Footer
   ============================================ */
footer {
    background-color: var(--dark-color) !important;
    padding: 60px 0 20px;
}

footer h5 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    margin-bottom: 0.75rem;
}

footer ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

#footer-quick-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

#footer-quick-links a:hover {
    color: var(--accent-color);
}

#footer-design {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

#footer-design a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

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

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

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .navbar-logo-img {
        height: 70px;
        max-width: 300px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .hero-cta .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-card {
        margin-bottom: 1.5rem;
    }
    
    .map-container {
        height: 350px;
    }
    
    #services,
    #history,
    #products,
    #how-it-works,
    #faq,
    #final-cta,
    #contact {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-logo-img {
        height: 60px;
        max-width: 250px;
    }
    
    .hero-section {
        padding-top: 100px;
        min-height: 100vh;
    }
    
    .hero-carousel {
        height: 100vh;
    }
    
    .hero-carousel .owl-stage-outer {
        height: 100vh;
    }
    
    .hero-carousel .owl-stage {
        height: 100vh;
    }
    
    .hero-carousel .owl-item {
        height: 100vh;
    }
    
    .hero-slide {
        height: 100vh;
        min-height: 100vh;
    }
    
    .feature-card,
    .product-card,
    .step-card {
        margin-bottom: 1.5rem;
    }
}

/* ============================================
   WhatsApp Floating Button
   ============================================ */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
    color: var(--white);
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-tooltip {
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--dark-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: var(--dark-color);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    left: calc(100% + 20px);
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        left: 20px;
        font-size: 28px;
        z-index: 9999;
    }
    
    .whatsapp-float i {
        font-size: 28px;
    }
    
    .whatsapp-tooltip {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-to-top {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50px;
    text-align: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(26, 95, 122, 0.4);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26, 95, 122, 0.6);
}

.scroll-to-top i {
    color: var(--white);
    font-size: 20px;
}

@media (max-width: 768px) {
    .scroll-to-top {
        display: flex;
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }
    
    .scroll-to-top i {
        font-size: 18px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-primary-custom {
    color: var(--primary-color);
}

.bg-primary-custom {
    background-color: var(--primary-color);
}

.text-accent {
    color: var(--accent-color);
}

.bg-accent {
    background-color: var(--accent-color);
}
