/* Estilos personalizados para HM Landscaping */

/* Variables CSS */
:root {
    --primary: #224877;
    --secondary: #23a455;
    --accent: #23a455;
    --light: #ffffff;
    --dark: #1a365d;
    --gray-light: #e6edf5;
    --gray-medium: #c8d6e9;
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* Estilos generales */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    padding-top: 72px; /* Ajustar según la altura del header */
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

/* Header que se oculta/muestra al hacer scroll */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
    box-shadow: var(--shadow-md);
}

.header-hidden {
    transform: translateY(-100%);
}

/* Botón para volver al inicio */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: var(--light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 999;
    box-shadow: var(--shadow-lg);
    font-size: 1.25rem;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    animation: pulse 2s infinite;
}

.back-to-top:hover {
    background-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(35, 164, 85, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(35, 164, 85, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(35, 164, 85, 0);
    }
}

/* Animaciones y transiciones */
.fade-in {
    animation: fadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    40% { opacity: 0.7; transform: scale(1.1); }
    60% { opacity: 0.8; transform: scale(0.95); }
    80% { opacity: 0.9; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

.fade-in-left {
    animation: fadeInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-right {
    animation: fadeInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.zoom-in {
    animation: zoomIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bounce-in {
    animation: bounceIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Efectos de hover para elementos interactivos */
.hover-grow {
    transition: transform var(--transition-fast);
}

.hover-grow:hover {
    transform: scale(1.05);
}

.hover-lift {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Animación para el menú */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#menu.show {
    display: block;
    animation: slideDown 0.3s ease-in-out;
}

/* Mejoras para imágenes */
.img-hover-zoom {
    overflow: hidden;
    border-radius: 0.5rem;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

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

/* Animaciones al hacer scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    visibility: hidden;
}

.animate-on-scroll.fade-in {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.animate-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    visibility: hidden;
}

.animate-left.fade-in {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.animate-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    visibility: hidden;
}

.animate-right.fade-in {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.animate-zoom {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
    visibility: hidden;
}

.animate-zoom.fade-in {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}



/* Animaciones para la sección Hero y servicios */
#inicio, #servicios {
    opacity: 0;
    animation: fadeIn 1.2s ease-in-out forwards;
}

#inicio .container, #servicios .container {
    opacity: 0;
    animation: fadeIn 1.5s ease-in-out 0.3s forwards;
}

/* Overlay para la sección Hero */
.hero-overlay {
    background-color: rgba(16, 33, 80, 0.404);
}

/* Mejoras para botones */
.btn-hover-effect {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-hover-effect:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-hover-effect:hover::before {
    transform: translateX(0);
}

.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(35, 164, 85, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(35, 164, 85, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(35, 164, 85, 0);
    }
}

/* Estilos para el formulario de contacto */
.form-input:focus {
    border-color: #23a455;
    box-shadow: 0 0 0 3px rgba(35, 164, 85, 0.2);
}

/* Estilos adicionales */

/* Mejoras para dispositivos móviles */
@media (max-width: 640px) {
    .mobile-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mobile-text-center {
        text-align: center;
    }
}

/* Estilos para la galería de imágenes */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Estilos para la sección de servicios */
.service-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    color: #23a455;
}

.service-card {
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    border-bottom: 3px solid #23a455;
}

.service-image {
    overflow: hidden;
}

.service-image img {
    transition: transform 0.5s ease;
}

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

/* Estilos para el footer */
.footer-link {
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #23a455;
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}