/*
Theme Name: toropampa
Theme URI: https://toropampa.com.py/
Author: Nestor Morel
Description: plantilla a medida para toropampa web
Version: 4.0.1
*/


:root {
	--tp-primary: #0D6D46;
	--tp-primary-rgb: 13, 109, 70;
	--tp-accent: #F59C00;
	--tp-dark: #333333;
	--tp-gray: #606060;
	--tp-white: #ffffff;
	--tp-light-bg: #f9f9f9;
	--tp-text-secondary: #606060;
	--tp-footer-bg: #0D6D46;
	--tp-footer-bottom: #014520;
}

body {
	font-family: 'Roboto', sans-serif;
	color: var(--tp-dark);
	background-color: #ffffff;
	margin: 0;
	overflow-x: hidden;
}


.site-main {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

img {
	max-width: 100%;
	height: auto;
}

h1, h2, h3, h4, h5, h6, .nav-link, .btn, .slide-btn {
	font-family: 'Montserrat', sans-serif;
}


.bg-tp-primary { background-color: var(--tp-primary) !important; }


.top-bar {
	font-size: 0.82rem;
	letter-spacing: 0.2px;
}

.top-bar .contact-info-top {
	font-weight: 400;
}

.top-bar svg {
	opacity: 0.9;
}


.navbar .nav-link {
	position: relative;
	font-size: 0.82rem;
	letter-spacing: 1.2px;
	font-weight: 500;
	padding: 10px 16px !important;
	transition: color 0.3s;
	color: #333 !important;
	text-transform: uppercase;
}

.navbar .navbar-nav .nav-link {
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 15px !important;
	margin-right: 15px !important;
	position: relative !important;
}

.navbar .navbar-nav .nav-link::before {
	content: '' !important;
	position: absolute !important;
	bottom: 5px !important;
	left: 0 !important;
	width: 0 !important;
	height: 1.5px !important;
	background: #333 !important;
	transform: none !important;
	transition: width 0.3s ease !important;
}

.navbar .navbar-nav .nav-link:hover::before,
.navbar .navbar-nav .current-menu-item > .nav-link::before,
.navbar .navbar-nav .current_page_item > .nav-link::before {
	width: 100% !important;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .current-menu-item > .nav-link,
.navbar .navbar-nav .current_page_item > .nav-link {
	color: var(--tp-primary) !important;
}


.navbar .dropdown-menu {
	border: none;
	border-radius: 0;
	box-shadow: 0 6px 18px rgba(0,0,0,0.2);
	padding: 0;
	margin-top: 0;
	background-color: #ffffff;
}

.navbar .dropdown-item {
	font-family: 'Montserrat', sans-serif;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--tp-primary) !important;
	text-transform: uppercase;
	letter-spacing: 1px;
	padding: 14px 24px;
	transition: all 0.2s;
	border-bottom: 1px solid #f0f0f0;
}

.navbar .dropdown-item:last-child {
	border-bottom: none;
}

.navbar .dropdown-item:hover {
	background-color: var(--tp-primary) !important;
	color: #ffffff !important;
}

/* --- Hover for Submenus (Desktop) --- */
@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: all 0.3s ease;
    }
    
    .navbar .nav-item.dropdown .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
    }
}


.navbar .dropdown-toggle::after {
	color: var(--tp-primary);
	vertical-align: 0.15em;
	margin-left: 0.4em;
}


.hero-slider {
	position: relative;
	width: 100%;
	height: 65vh;
    min-height: 480px;
    max-height: 550px;
	background: transparent;
	overflow: hidden; /* Evitar desbordamientos */
}

.slider-container {
	position: relative;
	width: 100%;
	height: 100%;
}

.slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 1s ease-in-out;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

.slide.active {
	opacity: 1;
	z-index: 1;
}

.slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	color: #fff;
	background: rgba(0, 0, 0, 0.4);
	border: 2px solid rgba(255,255,255,0.7);
	font-size: 1.8rem;
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s;
	border-radius: 50%;
    padding-bottom: 4px; 
}

.slider-arrow:hover {
	background: var(--tp-primary);
	border-color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev { left: 30px; }
.slider-arrow.next { right: 30px; }

.slider-controls {
	position: absolute;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	gap: 12px;
}

.slider-dot {
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: rgba(255,255,255,0.4);
	border: 1px solid rgba(0,0,0,0.2);
	cursor: pointer;
}

.slider-dot.active {
	background: var(--tp-primary);
	border-color: #fff;
}


.btn-edit-shortcut {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 100;
	background: #fff;
	color: var(--tp-primary);
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(0,0,0,0.2);
	text-decoration: none;
	transition: all 0.2s;
}

.btn-edit-shortcut:hover {
	background: var(--tp-primary);
	color: #fff;
	transform: scale(1.1);
}


.section-15-anios {
    padding: 100px 20px;
    background: var(--tp-light-bg);
    text-align: center;
}

.section-15-anios h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--tp-primary) !important; 
    text-transform: uppercase;
    margin-bottom: 5px;
    line-height: 1.2;
}

.separator-verde {
    width: 120px;
    height: 4px;
    background: var(--tp-primary);
    margin: 15px auto 30px; /* Centrado bajo el título */
}

.text-15-anios {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--tp-text-secondary);
    max-width: 900px;
    margin: 0 auto 40px;
}

.text-15-anios img {
    max-width: 300px !important; 
    height: auto !important;
    display: block;
    margin: 20px auto;
}

.partner-logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.partner-logos-container img {
    height: 55px;
    width: auto;
    max-width: 160px !important;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.65;
    transition: all 0.3s;
}

.partner-logos-container img:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.08);
}


.services-grid-wrapper {
	padding: 100px 20px;
	background: #fff;
}

.services-grid-wrapper h2 {
	text-align: center;
	font-size: 2.2rem;
	margin-bottom: 8px;
	font-weight: 700;
	color: var(--tp-dark);
}


.services-grid-wrapper h2 span {
	color: var(--tp-primary);
}


.section-15-anios h2 span {
	color: var(--tp-primary);
}

.services-modern-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 25px;
	margin-top: 50px;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.modern-service-item {
	display: block;
	aspect-ratio: 1 / 1;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	position: relative;
	overflow: hidden;
	text-decoration: none;
	border-radius: 4px;
	transition: transform 0.4s ease;
	background-color: #f0f0f0; 
}

.modern-service-item:hover {
	transform: scale(1.04);
	box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}


.site-footer {
	background-color: var(--tp-footer-bg);
	color: rgba(255,255,255,0.85);
	padding: 70px 0 0;
}

.site-footer .footer-logo {
	max-width: 180px;
	height: auto;
	filter: brightness(0) invert(1);
	margin-bottom: 25px;
}

.site-footer h4 {
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	text-transform: uppercase;
	margin-bottom: 25px;
	border-bottom: 2px solid rgba(255,255,255,0.1);
	padding-bottom: 10px;
	display: inline-block;
}

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

.site-footer ul li {
	margin-bottom: 12px;
}

.site-footer a {
	color: rgba(255,255,255,0.7);
	text-decoration: none;
	transition: color 0.3s;
	font-size: 0.88rem;
}

.site-footer a:hover {
	color: #fff;
}

.site-footer p {
	font-size: 0.88rem;
	line-height: 1.6;
}

.footer-bottom {
	background: var(--tp-footer-bottom);
	padding: 20px 0;
	margin-top: 50px;
	font-size: 0.8rem;
}

.footer-bottom p {
	margin: 0;
	opacity: 0.6;
}


.editor-content-wrapper {
    background: #fff;
    margin-top: -20px;
    position: relative;
    z-index: 5;
}

.editor-content-wrapper img {
    display: block;
    margin: 40px auto;
    max-width: 600px !important; 
    height: auto !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}


.map-section {
    width: 100%;
    height: 450px;
    margin: 0;      
    padding: 0;
    display: block; 
    line-height: 0;
}

.map-section iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}


@media (max-width: 1200px) {
	.services-modern-grid { gap: 15px; padding: 0 10px; }
	.modern-service-item h3 { font-size: 1rem; }
}

@media (max-width: 992px) {
	.hero-slider { height: 400px; }
	.services-modern-grid { grid-template-columns: repeat(2, 1fr); }
	.site-footer { text-align: center; }
	.site-footer .footer-logo { margin-left: auto; margin-right: auto; }
	.site-footer h4 { display: block; }
}

@media (max-width: 768px) {
	.hero-slider { height: min(100vw, 500px); }
	.section-15-anios h2, .services-grid-wrapper h2 { font-size: 1.8rem; }
    .slider-arrow { width: 40px; height: 40px; font-size: 1.5rem; }
}

@media (max-width: 576px) {
	.hero-slider { height: min(100vw, 450px); width: 100% !important; margin: 0 !important; }
	.slider-container { width: 100vw !important; left: 50%; transform: translateX(-50%); }
	.services-modern-grid { grid-template-columns: 1fr; }
	.top-bar { display: none !important; }
}

/* --- Mejoras de Responsividad (v4.1) --- */
@media (max-width: 768px) {
    .section-15-anios, .services-grid-wrapper, .section-nosotros {
        padding: 60px 15px !important;
    }
    
    .text-15-anios {
        font-size: 1.05rem;
        margin-bottom: 30px;
    }

    .nosotros-row {
        margin-bottom: 50px !important;
    }

    .logo-green-box {
        height: auto !important;
        min-height: 200px;
        margin-bottom: 20px;
    }

    .nosotros-text h2 {
        font-size: 1.4rem;
    }
    
    .nosotros-text p {
        font-size: 1.05rem;
        text-align: left !important;
    }

    .partner-logos-container {
        gap: 20px;
    }
    
    .partner-logos-container img {
        height: 40px;
    }

    .tp-tabs-nav {
        gap: 15px;
    }

    .tp-tab-btn {
        padding: 10px 20px;
        font-size: 1.1rem;
    }
}


.nosotros-page {
    padding: 80px 0 0 0; /* Cero padding abajo para que pegue al footer */
    overflow: hidden;
    margin-bottom: 0;
}

.nosotros-row {
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.last-nosotros-row {
    margin-bottom: 0 !important;
}

.nosotros-row.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.logo-green-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    height: 400px;
    overflow: hidden;
    background-color: #0D6D46 !important; /* Forzar verde institucional sólido */
    padding: 0;
    box-shadow: none; /* Eliminar posibles sombras que oscurezcan bordes */
}

.logo-green-box img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain; 
    transition: transform 0.3s ease;
}

.logo-green-box:hover img {
    transform: scale(1.05);
}

.nosotros-text h2 {
    color: #0D6D46;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.nosotros-text h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: #F0A500;
}

.nosotros-text p {
    color: #555;
    line-height: 1.8;
    font-size: 1.15rem;
}

.nosotros-image-container {
    overflow: hidden;
    border-radius: 8px;
    height: 400px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.nosotros-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.nosotros-image-container:hover img {
    transform: scale(1.03);
}


/* --- Nueva Sección Cultura (Basada en Referencia) --- */
.nos-culture-row {
    background-color: #f1f4f6;
    min-height: 400px; /* Balance premium: ni muy gigante, ni muy angosto */
}

.nos-culture-image-box {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

@media (min-width: 768px) {
    .nos-culture-image-box {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.nos-culture-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nos-culture-tabs-wrapper {
    padding: 30px 45px !important;
}

.nos-culture-row .tp-tabs-hybrid {
    display: flex !important; /* Asegurar horizontalidad */
    flex-wrap: wrap;
    border-bottom: 2px solid #0D6D46; /* Verde debajo del tab como solicitado */
    margin-bottom: 20px;
}

.tp-tab-group {
    display: contents; /* Fundamental para que botones y panes se alineen bien con flex */
}

.nos-culture-row .tp-tab-btn {
    background: transparent;
    color: #4a5568;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
}

.nos-culture-row .tp-tab-btn.active {
    background-color: #0D6D46 !important; /* Verde primario de Toro Pampa */
    color: #ffffff !important;
}

.nos-culture-row .tp-tab-btn:hover:not(.active) {
    background-color: rgba(13, 109, 70, 0.05); /* Verde hover */
    color: #0D6D46;
}

.nos-culture-row .tp-tab-pane {
    display: none; /* Oculto por defecto */
    width: 100%;
    padding: 10px 0;
    order: 2; /* Aparece debajo de los botones */
}

.nos-culture-row .tp-tab-pane.active {
    display: block; /* Solo activo */
    animation: fadeInTab 0.4s ease;
}

.nos-culture-row .tp-tab-pane p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1rem;
}

@media (max-width: 991px) {
    .nos-culture-tabs-wrapper {
        padding: 25px !important;
    }
    .nos-culture-image-box {
        min-height: 250px; /* Only apply min-height on mobile where stacking happens */
    }
}

@media (max-width: 767px) {
    .nos-culture-row {
        flex-direction: column;
    }
    .nos-culture-image-box {
        min-height: 200px;
    }
    .nos-culture-tabs-wrapper {
        padding: 30px 20px !important;
    }
    .nos-culture-row .tp-tab-btn {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
}

@keyframes fadeInTab {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .tp-tabs-nav { flex-direction: column; gap: 10px; align-items: center; }
    .tp-tab-btn { width: 100%; text-align: center; }
}

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #0D6D46;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 999999 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

#backToTop.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: fadeInScale 0.3s ease-out forwards;
}

#backToTop:hover {
    background-color: #0a5233;
    transform: translateY(-5px);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}


.tp-edit-link {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #0D6D46;
    color: white !important;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, background 0.3s ease;
    text-decoration: none !important;
}
.tp-edit-link:hover {
    transform: scale(1.1);
    background: #0a5638;
}
.tp-edit-link span {
    font-size: 18px;
    width: 20px;
    height: 20px;
}

.position-relative { position: relative; }

/* --- Unified Premium Banners --- */
.tp-hero-banner, .nosotros-header {
    height: 35vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 30px 20px;
    position: relative;
    background-color: var(--tp-primary) !important;
}


.tp-hero-banner .container, .nosotros-header .container {
    position: relative;
    z-index: 2;
}

.tp-hero-banner h1, .nosotros-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 5px 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.tp-hero-banner p, .nosotros-header .banner-desc {
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 850px;
    margin: 0 auto;
    opacity: 1;
    line-height: 1.3;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

@media (min-width: 992px) {
    .tp-hero-banner, .nosotros-header {
        height: 450px;
    }
    .tp-hero-banner h1, .nosotros-header h1 {
        font-size: 3.5rem;
    }
    .tp-hero-banner p, .nosotros-header .banner-desc {
        font-size: 1.7rem;
    }
}

@media (max-width: 767px) {
    .tp-hero-banner h1, .nosotros-header h1 {
        font-size: 2rem;
    }
    .tp-hero-banner p, .nosotros-header .banner-desc {
        font-size: 1.1rem;
    }
}

/* Servicios Logisticos Grid */
.tp-services-grid-wrapper {
    background-color: transparent;
}

@media (min-width: 768px) {
    .border-end-md {
        border-right: 1px solid #e0e0e0;
    }
}

.border-bottom {
    border-bottom: 1px solid #e0e0e0 !important;
}

.tp-grid-item {
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tp-grid-item:hover {
    background-color: #f6fdf9;
}

.btn-outline-primary {
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background-color: var(--tp-primary) !important;
    color: #fff !important;
}

/* --- Mobile Menu Refinements --- */
@media (max-width: 991px) {
    .navbar-toggler {
        padding: 0;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        border: none !important;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-collapse {
        background: #fff;
        padding: 10px 0;
        border-top: 1px solid #f0f0f0;
        margin-top: 15px;
    }

    .navbar .navbar-nav .nav-link {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 14px 20px !important;
        border-bottom: 1px solid #f8f8f8;
        font-size: 0.95rem;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 600;
    }

    .navbar .navbar-nav .nav-link::before {
        display: none !important; /* Hide underline on mobile for cleaner look */
    }

    .navbar .navbar-nav .nav-link:hover,
    .navbar .navbar-nav .current-menu-item > .nav-link,
    .navbar .navbar-nav .current_page_item > .nav-link {
        background-color: #fcfcfc;
        color: var(--tp-primary) !important;
    }

    .navbar .dropdown-menu {
        border-radius: 0;
        box-shadow: none;
        background: #f9f9f9;
        border-left: 4px solid var(--tp-primary);
        margin: 5px 20px !important;
        padding: 5px 0;
        display: none; /* Let collapse handle it or stay static if expanded */
    }

    .navbar .dropdown-menu.show {
        display: block;
    }

    .navbar .dropdown-item {
        padding: 12px 20px;
        border-bottom: none;
        font-size: 0.9rem;
        font-weight: 500;
    }
}
