/**
 * ================================================
 * Mar Calmo - Estilos Globales
 * Archivo principal de estilos CSS
 * ================================================
 * Este archivo contiene todas las reglas de estilo
 * para el sitio web de Mar Calmo, incluyendo:
 * - Variables CSS
 * - Estilos generales
 * - Componentes reutilizables
 * - Media queries para responsividad
 * ================================================
 */

/**
 * Variables CSS - Definición de la paleta de colores y valores reutilizables
 */
:root {
    --primary-blue: #003366;        /* Azul principal - Marca */
    --secondary-blue: #00509d;      /* Azul secundario - Hover */
    --accent-blue: #0077b6;         /* Azul acento - Énfasis */
    --dark-color: #1a1a1a;          /* Color oscuro - Texto */
    --light-color: #f8f9fa;         /* Color claro - Fondo */
    --transition-smooth: all 0.3s ease-in-out; /* Transición unificada */
}

/**
 * Estilos generales del body
 */
body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    position: relative;
    width: 100%;
    background-image: url('../imagenes/empresa/fondo.jpeg');
    background-size: 800px;
    background-position: center top;
    background-attachment: scroll;
    background-repeat: repeat;
    background-color: #f8f9fa;
}

/**
 * Capa de difuminado y claridad sobre el fondo
 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(1px);
    z-index: -1;
}

/**
 * Navbar - Barra de navegación
 */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition-smooth);
    width: 100%; 
    padding: 0; 
    min-height: 80px;
}

/**
 * Logo de la navbar
 */
.navbar-brand img {
    height: 120px;
    transition: var(--transition-smooth);
    padding: 5px 0;
    margin-top: -10px;
    margin-bottom: -10px;
}

/**
 * Tarjetas de productos (Market Card) - Estilo unificado
 */
.market-card {
    border: 1px solid #eee;
    border-radius: 12px; 
    background-color: #ffffff !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    min-height: 300px;
    position: relative;
}

/**
 * Pseudo-elemento de la bandera Argentina en las tarjetas
 */
.market-card::after {
    content: "";
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 20px;
    background: linear-gradient(to bottom, #74ACDF 33.3%, #ffffff 33.3%, #ffffff 66.6%, #74ACDF 66.6%);
    border-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0.8;
    z-index: 2;
}

/**
 * Efecto hover de las tarjetas
 */
.market-card:hover {
    transform: translateY(-10px); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/**
 * Contenedor de la imagen en la tarjeta
 */
.market-card .market-img-container {
    height: 180px;
    background: linear-gradient(to bottom, #e0f7ff 0%, #b8e6ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    overflow: hidden;
}

/**
 * Imagen dentro del contenedor de la tarjeta
 */
.market-card .market-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.market-card .market-img-container img.product-zoom-soft {
    transform: scale(1.14);
    transform-origin: center;
}

.market-card .market-img-container img.product-focus-center {
    object-position: center center;
}

.market-card .market-img-container img.product-focus-lower {
    object-position: center 68%;
}


/**
 * Estilos del carrusel (carousel)
 */
.carousel-item {
    height: 350px;
    min-height: 350px;
    background-color: var(--dark-color);
    position: relative;
    overflow: hidden;
}

/**
 * Imagen del carrusel
 */
.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 1;
}

/**
 * Contenedor fluid - Márgenes unificados
 */
.container-fluid {
    padding-left: 2.5%;
    padding-right: 2.5%;
    max-width: 2000px;
    margin: 0 auto;
}

/**
 * Espaciado uniforme entre secciones
 */
main section, 
main .row {
    margin-bottom: 4rem !important;
}

/**
 * Márgenes del contenedor de la navbar
 */
.navbar .container-fluid {
    padding-left: 2.5% !important;
    padding-right: 2.5% !important;
}

/**
 * Título y subtítulo del carrusel (centrado perfectamente)
 */
.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    padding: 0;
    bottom: auto; 
    text-align: center;
    z-index: 20;
    background: transparent;
    pointer-events: none;
}

/**
 * Título principal del carrusel
 */
.carousel-caption h1 {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff !important;
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.7);
    margin-bottom: 15px;
}

/**
 * Subtítulo del carrusel
 */
.carousel-caption p {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff !important;
    font-size: 1.5rem;
    font-weight: 500;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.7);
    margin-bottom: 0;
}

/**
 * Overlay oscuro sobre las imágenes del carrusel
 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 5;
}

/**
 * Cuerpo de la tarjeta
 */
.market-card .card-body {
    padding: 1.2rem;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/**
 * Título de la tarjeta
 */
.market-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
    font-weight: 700;
}

/**
 * Texto de la tarjeta
 */
.market-card .card-text {
    font-size: 1rem !important;
}

/**
 * Enlaces de la navbar
 */
.nav-link {
    color: var(--primary-blue) !important;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0 10px;
    position: relative;
}

/**
 * Línea inferior animada en los enlaces
 */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-blue);
    transition: var(--transition-smooth);
}

/**
 * Efecto hover y estado active en los enlaces
 */
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/**
 * Tipografía - Títulos
 */
h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/**
 * Animación de aparición (fade-in)
 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/**
 * Estado visible de la animación fade-in
 */
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/**
 * Footer - Pie de página
 */
footer {
    background-color: var(--primary-blue);
    color: white;
    padding: 40px 0 20px; 
    position: relative;
}

/**
 * Contenedor del footer
 */
footer .container-fluid {
    padding-left: 5%;
    padding-right: 5%;
}

/**
 * Títulos del footer
 */
footer h5 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/**
 * Párrafos y listas del footer
 */
footer p, footer li {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/**
 * Enlaces del footer
 */
footer a {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

/**
 * Hover en enlaces del footer
 */
footer a:hover {
    color: var(--accent-blue);
}

/**
 * Tarjetas generales (Bootstrap)
 */
.card {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: var(--transition-smooth);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
}

/**
 * Hover en tarjetas
 */
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/**
 * Epígrafe para fotos (pie de foto)
 */
.epigraph {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 5px;
    color: var(--dark-color);
    text-align: left;
}

/**
 * Imágenes laterales (alineadas con texto)
 */
.img-side {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/**
 * Imagen secundaria (con ajuste de altura)
 */
.img-second {
    height: 550px;
    object-fit: cover;
}

/**
 * Tarjetas de exportación (productos)
 */
.export-card {
    background-color: #ffffff !important;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
    text-align: center;
    overflow: hidden;
}

/**
 * Imagen de la tarjeta de exportación
 */
.export-card .card-img-top {
    height: 180px;
    object-fit: contain;
    padding: 15px;
    background-color: #ffffff;
}

/**
 * Cuerpo de la tarjeta de exportación
 */
.export-card .card-body {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 1.2rem;
}

/**
 * Título de la tarjeta de exportación
 */
.export-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/**
 * Clases de utilidad
 */
.bg-primary-blue { background-color: var(--primary-blue); }
.text-primary-blue { color: var(--primary-blue); }

/**
 * Cuadros de información (info-box)
 */
.info-box {
    background-color: #f0f4f8;
    border: 1px solid #d1d9e6;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.05);
    transition: var(--transition-smooth);
}

/**
 * Título del cuadro de información
 */
.info-box h3 {
    color: var(--primary-blue);
}

/**
 * Párrafo del cuadro de información
 */
.info-box p {
    color: var(--dark-color);
}

/**
 * Tarjetas interactivas de información de contacto (Dirección, Email, Teléfono)
 */
.contact-card-link {
    transition: var(--transition-smooth);
    background-color: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 51, 102, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.contact-card-link:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.12);
    border-color: rgba(0, 51, 102, 0.2);
}

.contact-card-link:hover i.fs-2 {
    transform: scale(1.15);
    color: var(--accent-blue) !important;
}

.contact-card-link i.fs-2 {
    transition: var(--transition-smooth);
}

/**
 * Media Queries - Ajustes responsivos para dispositivos móviles
 */
@media (max-width: 992px) {
    body {
        background-size: 500px;
    }
    
    .navbar-brand img {
        height: 60px;
    }
    
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
    
    .carousel-caption p {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    body {
        background-size: 400px;
    }
    
    .navbar-brand img {
        height: 50px;
    }
    
    .img-side {
        max-width: 100%;
        margin-top: 20px;
    }
    
    .carousel-item {
        height: 250px;
        min-height: 250px;
    }
    
    .carousel-caption h1 {
        font-size: 1.8rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    body {
        background-size: 300px;
    }
    
    .navbar-brand img {
        height: 40px;
    }
    
    .carousel-item {
        height: 200px;
        min-height: 200px;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
}

/**
 * Ajustes de textos y espaciados responsivos globales
 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem !important;
    }
    h2 {
        font-size: 1.5rem !important;
    }
    h3 {
        font-size: 1.35rem !important;
    }
    p, li, a {
        font-size: 0.95rem;
    }
    .info-box {
        padding: 20px !important;
    }
}

/**
 * Botón Volver Arriba (Back to Top)
 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.back-to-top:hover {
    background-color: var(--accent-blue);
    transform: translateY(-3px);
    color: white;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .back-to-top {
        right: 22px;
        bottom: 84px;
    }
}

/**
 * Boton flotante de WhatsApp para la pagina de contacto
 */
.whatsapp-floating-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #25D366;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    z-index: 1100;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-floating-button:hover {
    transform: translateY(-3px) scale(1.05);
    background-color: #128C7E;
    color: #ffffff !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
}

@media (max-width: 768px) {
    .whatsapp-floating-button {
        right: 16px;
        bottom: 16px;
        width: 56px;
        height: 56px;
        font-size: 1.8rem;
    }
}
