/*
Theme Name: Toro Pampa Theme
Theme URI: https://toropampa.com.py/
Author: Nestor Morel
Description: Tema clásico Bootstrap para Toro Pampa (Autoadministrable - v4)
Version: 3.1.0
*/

/* =========================================
   CORE DESIGN TOKENS
   ========================================= */
:root {
	--tp-primary: #0D6D46;
	--tp-primary-rgb: 13, 109, 70;
	--tp-dark: #333333;
	--tp-white: #ffffff;
	--tp-light-bg: #f9f9f9;
	--tp-text-secondary: #7A7A7A;
	--tp-footer-bg: #0D6D46;
	--tp-footer-bottom: #0a5a39;
}

body {
	font-family: 'Roboto', sans-serif;
	color: var(--tp-dark);
	margin: 0;
	overflow-x: hidden;
}

/* Eliminar espacio entre mapa y footer */
.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;
}

/* Utils */
.bg-tp-primary { background-color: var(--tp-primary) !important; }

/* =========================================
   TOP BAR
   ========================================= */
.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
   ========================================= */
.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 .nav-link::after {
	content: '';
	position: absolute;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 2px;
	background: var(--tp-primary);
	transition: width 0.3s ease;
}

.navbar .nav-link:hover::after,
.navbar .current-menu-item > .nav-link::after {
	width: 65%;
}

.navbar .nav-link:hover {
	color: var(--tp-primary) !important;
}

/* Dropdown Menu styling matching original */
.navbar .dropdown-menu {
	border: none;
	border-radius: 0;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	padding: 8px 0;
	margin-top: 0;
}

.navbar .dropdown-item {
	font-family: 'Montserrat', sans-serif;
	font-size: 0.81rem;
	font-weight: 500;
	color: var(--tp-primary) !important;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding: 14px 24px;
	transition: background 0.2s;
}

.navbar .dropdown-item:hover {
	background-color: #f1f8f5;
	color: var(--tp-primary) !important;
}

/* Caret color */
.navbar .dropdown-toggle::after {
	color: var(--tp-primary);
	vertical-align: 0.15em;
	margin-left: 0.4em;
}

/* =========================================
   HERO SLIDER
   ========================================= */
.hero-slider {
	position: relative;
	width: 100%;
	height: 450px; /* Reducido según petición */
	background: #000;
}

.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;
}

.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; /* Centrado visual */
}

.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;
}

/* Admin Edit Pencil */
.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);
}

/* =========================================
   SECCION 15 ANOS
   ========================================= */
.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; /* Force green color */
    text-transform: uppercase;
    margin-bottom: 5px;
}

.separator-verde {
    width: 60px;
    height: 4px;
    background: var(--tp-primary);
    margin: 20px auto;
}

.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; /* Strictly limit logo-like images in descriptions */
    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);
}

/* =========================================
   NUESTROS SERVICIOS (MODERN GRID)
   ========================================= */
.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);
}

/* "Servicios" word in green */
.services-grid-wrapper h2 span {
	color: var(--tp-primary);
}

/* "15 años" text in green when wrapped in span */
.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; /* Fallback color */
}

.modern-service-item:hover {
	transform: scale(1.04);
	box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* =========================================
   FOOTER (FIXED ALIGNMENT)
   ========================================= */
.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 AREA
   ========================================= */
.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; /* Strictly constrain massive images from editor */
    height: auto !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* =========================================
   MAPA
   ========================================= */
.map-section {
    width: 100%;
    height: 450px;
    margin: 0;      /* Sin espacio entre mapa y footer */
    padding: 0;
    display: block; /* Evitar espacio de inline */
    line-height: 0;
}

.map-section iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@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: 350px; }
	.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: 280px; }
	.services-modern-grid { grid-template-columns: 1fr; }
	.top-bar { display: none !important; }
}

/* page-nuestra-empresa.php Refined Styles */
.nosotros-header {
    background-color: #0D6D46;
    color: white;
    padding: 80px 0;
    margin-bottom: 0;
    text-align: center;
}

.nosotros-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1px;
}

.section-nosotros {
    padding: 80px 0;
    overflow: hidden;
}

.nosotros-row {
    margin-bottom: 100px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.nosotros-row.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.logo-green-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    height: 380px;
    overflow: hidden;
}

.logo-green-box img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Keep logo proportions */
    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: 4px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.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);
}

/* Tabs System - Matched to Screenshot */
.tp-tabs-container {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

.tp-tabs-nav {
    display: flex;
    justify-content: center;
    background: transparent;
    border-bottom: none;
    gap: 40px;
    margin-bottom: 40px;
}

.tp-tab-btn {
    flex: none;
    padding: 15px 35px;
    border: none;
    background: transparent;
    font-weight: 500;
    text-transform: none; /* Changed to Title Case as per screenshot */
    font-size: 1.25rem;
    color: #4A4A4A;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.tp-tab-btn.active {
    background: #0D6D46; /* Dark Green Box from Screenshot */
    color: #fff;
    border-bottom-color: transparent;
}

.tp-tab-btn:hover:not(.active) {
    color: #0D6D46;
}

.tp-tab-content {
    padding: 0; /* Remove padding to keep text aligned to container */
    min-height: auto;
}

.tp-tab-pane {
    display: none;
    animation: fadeInTab 0.4s ease;
}

.tp-tab-pane.active {
    display: block;
}

.tp-tab-pane h2 {
    display: none; /* Hide H2 inside tab content as per screenshot */
}

.tp-tab-pane p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #333;
    text-align: left;
}

@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; }
}
/* --- Scroll to Top Button --- */
#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; /* Hidden by default */
    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;
    }
}
