/* Custom styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 60px; /* Should match the header height */
}

body {
    font-family: 'Arial', sans-serif;
    padding-top: 0; /* Remove this line or set it to 0 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header styles */
header {
    position: fixed; /* Change from sticky to fixed */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: white; /* Ensure the header has a background */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Hero section styles */
#inicio {
    background-image: linear-gradient(to right, #3b82f6, #8b5cf6);
    padding-top: 60px; /* Adjust this value to match your header height */
}

#inicio h1 {
    font-size: 2.5rem;
}

#inicio p {
    font-size: 1.25rem;
}

/* Services section styles */
.service-card {
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Gallery section styles */
.gallery-image {
    transition: opacity 0.5s ease;
}

/* Gallery styles */
.gallery-item {
    overflow: hidden;
    position: relative;
    height: 200px;
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-item img,
.gallery-item video {
    transition: transform 0.3s ease;
}

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

/* Form styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Button styles */
.btn {
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #2563eb;
}

/* Testimonial styles */
.testimonial-card {
    transition: box-shadow 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Popup styles */
.popup {
    transition: opacity 0.3s ease;
}

/* Responsive styles */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #inicio {
        padding-top: 60px; /* Adjust if your mobile header has a different height */
    }

    #inicio h1 {
        font-size: 2.5rem;
    }

    #inicio p {
        font-size: 1.25rem;
    }

    .grid {
        grid-template-columns: 1fr !important;
    }

    .gallery-item {
        height: 200px;
    }

    #presupuesto form {
        padding: 1.5rem;
    }

    #testimonios .grid > div {
        margin-bottom: 1.5rem;
    }

    html {
        scroll-padding-top: 60px; /* Adjust to match mobile header height */
    }
}

/* Estilos del popup */
#successMessage {
    font-size: 16px; /* Tamaño de fuente del mensaje */
    font-weight: bold; /* Negrita */
    text-align: center; /* Centrar texto */
    margin-top: 10px; /* Espacio superior */
}

/* Clase para ocultar el mensaje */
.hidden {
    display: none; /* Ocultar el elemento */
}

/* CSS personalizado */
#testimonios img {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#testimonios img:hover {
    opacity: 1;
    transform: scale(1.1); /* Aumenta un poco el tamaño al hacer hover */
}

/* Modal styles */
#galleryModal {
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#galleryModal.hidden {
    display: none;
}

#modalContent {
    max-width: 90%;
    max-height: 90vh;
}

#closeModal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    cursor: pointer;
}

#closeModal:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Add these new styles to your existing CSS */

/* Animated background for hero section */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#inicio {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

/* Enhance service cards */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Improve gallery items */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Enhance testimonial cards */
.testimonial-card {
    transition: all 0.3s ease;
}

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

/* Improve form inputs */
input, select {
    transition: all 0.3s ease;
}

input:focus, select:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Enhance buttons */
.btn, button[type="submit"] {
    position: relative;
    overflow: hidden;
}

.btn::after, button[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:hover::after, button[type="submit"]:hover::after {
    width: 300px;
    height: 300px;
}

/* Add subtle animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Enhance scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Add these styles to your existing CSS file */

#servicios-adicionales .grid > div {
    position: relative;
    overflow: hidden;
}

#servicios-adicionales .grid > div:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Improve scrolling performance */
* {
    -webkit-overflow-scrolling: touch;
}

/* Prevent content from being hidden under fixed header */
body {
    padding-top: 0; /* Remove this line or set it to 0 */
}

header {
    position: fixed; /* Change from sticky to fixed */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: white; /* Ensure the header has a background */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Add these styles to your existing CSS file */

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    width: 100%;
    padding: 1rem;
}

.company-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logo-container:hover .company-logo {
    filter: grayscale(0%);
    opacity: 1;
}

@media (max-width: 640px) {
    .logo-container {
        height: 80px;
    }
}

/* Add these styles to your existing CSS file */

#prevItem, #nextItem {
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#prevItem:hover, #nextItem:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    #prevItem, #nextItem {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}
