@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-green: #50ba40;
  --primary-green-dark: #3a8d2e;
  --text-dark: #464c55;
  --text-gray: #666666;
  --light-bg: #f5f6f8;
  --font-family: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--light-bg);
}

/* --- Topbar --- */
.topbar {
  background-color: transparent;
  padding: 10px 0;
  font-size: 15px;
  color: #464c55;
  font-weight: 400;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #464c55;
}

.topbar-right {
  display: flex;
  gap: 15px;
}

.topbar-right a {
  color: #464c55;
  text-decoration: none;
  font-size: 15px;
  transition: opacity 0.3s;
}

.topbar-right a:hover {
  opacity: 0.7;
}

/* --- Main Header (Floating Box) --- */
header {
  position: relative;
  z-index: 100;
  padding: 0 20px;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 24px 12px 30px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(31, 33, 35, 0.1);
}

.logo img {
  height: 115px;
  width: auto;
}

/* Navigation */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 48px;
  margin-left: 20px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #464c55;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
}

.nav-text {
  padding-bottom: 5px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}

.nav-link i {
  color: #999;
  font-size: 9px !important;
}

.nav-item:hover .nav-text,
.nav-item.active .nav-text {
  border-bottom: 2px solid var(--primary-green);
}

/* Dropdown */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 180px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  list-style: none;
  border-radius: 4px;
  padding: 0;
  z-index: 1000;
}

.nav-item:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  padding: 0;
}

.dropdown-link {
  text-decoration: none;
  color: #666666;
  font-size: 13px;
  font-weight: 400;
  display: block;
  padding: 16px 24px;
  transition: color 0.3s, background-color 0.3s;
}

.dropdown-link:hover {
  color: var(--primary-green);
  background-color: #fafafa;
}

.dropdown-link.active {
  color: var(--primary-green);
  font-weight: 600;
}

/* Contact Button */
.btn-contact {
  background: linear-gradient(90deg, #50ba40 0%, #0d8a5e 100%);
  color: #ffffff;
  border: none;
  text-decoration: none;
  padding: 15px 24px 16px 24px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
  transition: opacity 0.3s ease;
  display: inline-block;
}

.btn-contact:hover {
  opacity: 0.9;
}

/* --- Main Content Area --- */
main {
  flex: 1;
  background-color: var(--primary-green);
  padding: 60px 20px;
  text-align: center;
  color: white;
}

main h1 {
  color: white;
  margin-bottom: 20px;
}

/* --- Footer --- */
footer {
  margin-top: auto;
}

.footer-top {
  background-color: var(--primary-green);
  color: white;
  padding: 50px 20px;
  text-align: center;
}

.footer-top .container {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-text {
  font-size: 14px;
  margin-bottom: 25px;
  font-weight: 400;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.footer-socials a {
  color: white;
  font-size: 15px;
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-socials a:hover {
  opacity: 0.8;
}

.footer-bottom {
  background-color: #000000;
  color: #ffffff;
  padding: 30px 20px;
  text-align: center;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: 0.015em;
}

.footer-bottom p {
  margin-bottom: 8px;
}

.footer-bottom .flag {
  display: flex;
  justify-content: center;
  margin-top: 5px;
}

.flag-img {
  width: 24px;
  height: auto;
  border-radius: 2px;
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  text-decoration: none;
  z-index: 1000;
  transition: transform 0.3s;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
}

/* --- Mobile Responsiveness --- */
.mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
}

@media (max-width: 992px) {
  .topbar .container {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
    text-align: center;
  }
  
  header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    flex-wrap: wrap;
  }

  .mobile-toggle {
    display: block;
    order: 1;
  }

  .logo {
    order: 2;
    flex: 1;
    text-align: center;
  }

  .logo img {
    height: 60px;
  }

  .contact-btn {
    order: 3;
  }
  
  .btn-contact {
    padding: 10px 15px;
    font-size: 14px;
  }

  nav {
    display: none;
    width: 100%;
    order: 4;
    margin-top: 15px;
  }
  
  nav.active {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    gap: 15px;
    margin-left: 0;
    width: 100%;
    align-items: flex-start;
  }

  .nav-item {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-left: 2px solid var(--primary-green);
    margin-top: 10px;
    display: none;
  }

  .footer-top .container {
    flex-direction: column;
    padding: 20px 10px;
  }
}

/* ==========================================================================
   Service / Breed Pages Styles (Cabras Boer & Brahman)
   ========================================================================== */

main.boer-page, main.brahman-page {
    background-color: var(--light-bg);
    padding: 0;
    text-align: left;
    color: var(--text-dark);
}

/* New Hero Section (Consistent with Main Page) */
.boer-hero-alt, .brahman-hero-alt {
    background-color: var(--primary-green);
    padding: 60px 20px 80px 20px;
    text-align: center;
    color: white;
    position: relative;
}

.hero-alt-content {
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeInDown 1s ease-out;
}

.hero-title-light {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.hero-subtitle-light {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.95);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 40px;
    animation: float 5s ease-in-out infinite;
}

.hero-image-container img {
    max-width: 100%;
    max-height: 480px;
    width: auto;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image-container img:hover {
    transform: scale(1.03);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.btn-primary-light {
    display: inline-block;
    background-color: white;
    color: var(--primary-green-dark);
    padding: 16px 45px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.15rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.btn-primary-light:hover {
    background-color: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    color: var(--primary-green);
}

/* Intro Section */
.boer-intro, .brahman-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.intro-text {
    flex: 1;
    min-width: 300px;
}

.intro-text h2 {
    font-size: 2.5rem;
    color: var(--primary-green-dark);
    margin-bottom: 25px;
}

.intro-text p {
    font-size: 1.15rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

.boer-benefits, .brahman-benefits {
    list-style: none;
    padding: 0;
}

.boer-benefits li, .brahman-benefits li {
    margin-bottom: 18px;
    font-size: 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.boer-benefits li:hover, .brahman-benefits li:hover {
    transform: translateX(10px);
    background: rgba(80, 186, 64, 0.05);
}

.boer-benefits li i, .brahman-benefits li i {
    color: var(--primary-green);
    margin-top: 5px;
    font-size: 1.2rem;
}

.benefit-title {
    width: 230px;
    flex-shrink: 0;
    display: block;
}

.benefit-desc {
    flex-grow: 1;
}

.intro-image {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.intro-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    transition: transform 0.5s ease;
}

.intro-image img:hover {
    transform: scale(1.02);
}

/* Gallery Section */
.boer-gallery, .brahman-gallery {
    background-color: white;
    padding: 40px 20px;
}

.text-center {
    text-align: center;
}

.boer-gallery h2, .brahman-gallery h2 {
    font-size: 2.5rem;
    color: var(--primary-green-dark);
    margin-bottom: 5px;
}

.gallery-desc {
    color: var(--text-gray);
    font-size: 1.15rem;
    margin-top: 0;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-grid {
    column-count: 3;
    column-gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        column-count: 1;
    }
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 25px;
    break-inside: avoid;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
}

.gallery-item.wide {
    /* Not needed for masonry, kept for HTML compatibility */
}

.gallery-item.center-last {
    column-span: all;
    width: calc(33.333% - 17px);
    margin: 0 auto 25px auto;
}

@media (max-width: 992px) {
    .gallery-item.center-last {
        width: calc(50% - 12.5px);
    }
}

@media (max-width: 768px) {
    .gallery-item.center-last {
        width: 100%;
    }
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: white;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.item-overlay span {
    font-size: 1.3rem;
    font-weight: 600;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover .item-overlay span {
    transform: translateY(0);
}

/* Detailed Info Section (Zig-Zag) */
.detailed-info {
    padding: 40px 20px;
    background-color: var(--light-bg);
    overflow: hidden;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto 80px;
    flex-wrap: wrap;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row.reverse {
    flex-direction: row-reverse;
}

.info-content {
    flex: 1;
    min-width: 320px;
}

.info-tag {
    color: var(--primary-green);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 700;
}

.info-content h2 {
    font-size: 2.5rem;
    color: var(--primary-green-dark);
    margin-bottom: 25px;
    line-height: 1.2;
}

.info-content p {
    font-size: 1.15rem;
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.8;
}

.info-visual {
    flex: 1;
    min-width: 320px;
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: 20px;
    z-index: 2;
}

.image-wrapper img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
}

.image-wrapper:hover img {
    transform: scale(1.02);
}

.visual-deco {
    position: absolute;
    top: 20px;
    left: -20px;
    width: 100%;
    height: 100%;
    background-color: rgba(80, 186, 64, 0.1);
    border: 2px solid var(--primary-green);
    border-radius: 20px;
    z-index: 1;
    transition: all 0.5s ease;
}

.info-row.reverse .visual-deco {
    left: 20px;
}

.image-wrapper:hover .visual-deco {
    top: 10px;
    left: -10px;
}

.info-row.reverse .image-wrapper:hover .visual-deco {
    left: 10px;
}

/* Scroll Animations */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-left {
    animation: slideInLeft 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.slide-in-right {
    animation: slideInRight 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stats Section */
.stats-section {
    background-color: white;
    padding: 40px 20px;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.03);
    position: relative;
    z-index: 10;
    margin-top: -50px;
    border-radius: 20px 20px 0 0;
}

.stats-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.05);
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.stat-item:hover i {
    transform: scale(1.2) rotate(5deg);
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--primary-green-dark);
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 1.1rem;
    color: var(--text-gray);
    font-weight: 500;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .hero-title-light {
        font-size: 3rem;
    }
    .intro-text h2, .boer-gallery h2, .brahman-gallery h2, .info-content h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hero-title-light {
        font-size: 2.5rem;
    }
    .hero-subtitle-light {
        font-size: 1.1rem;
    }
    .intro-text h2, .boer-gallery h2, .brahman-gallery h2, .info-content h2 {
        font-size: 2rem;
    }
    .boer-intro, .brahman-intro {
        padding: 60px 20px;
    }
    .boer-gallery, .brahman-gallery {
        padding: 60px 20px;
    }
    .detailed-info {
        padding: 60px 20px;
    }
    .info-row {
        gap: 40px;
        margin-bottom: 60px;
    }
    .visual-deco {
        display: none;
    }
}

/* Agreement Page Styles */
.agreement-page {
    background-color: #f9fdfa;
}
.agreement-hero {
    position: relative;
    padding: 160px 20px;
    margin-top: 80px;
    background-color: #2e7d32; /* fallback color */
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('imagen/brahman2.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.agreement-document {
    padding: 60px 20px;
    max-width: 1000px;
    margin: -60px auto 40px auto;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10;
}
.document-header h2 {
    font-size: 2.5rem;
    color: var(--primary-green-dark);
    margin-bottom: 20px;
}
.doc-intro {
    font-size: 1.15rem;
    color: var(--text-gray);
    margin-bottom: 40px;
}
.document-parties {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}
.party-card {
    flex: 1;
    background: #f1f8f3;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border-top: 4px solid var(--primary-green);
    transition: transform 0.3s ease;
}
.party-card:hover {
    transform: translateY(-5px);
}
.party-icon i {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 15px;
}
.party-card h3 {
    color: var(--primary-green-dark);
    margin-bottom: 10px;
}
.party-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
}
.doc-declaration {
    font-size: 1.2rem;
    color: var(--primary-green-dark);
    margin-bottom: 30px;
}
.clause-box {
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}
.clause-header {
    background: var(--primary-green);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.clause-header i {
    font-size: 1.5rem;
}
.clause-header h3 {
    margin: 0;
    font-size: 1.2rem;
}
.clause-content {
    padding: 25px;
    color: var(--text-gray);
    line-height: 1.6;
}
.commitments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.commitments-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.commitments-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.comm-icon {
    width: 50px;
    height: 50px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.comm-icon i {
    color: var(--primary-green);
    font-size: 1.2rem;
}
.comm-text h4 {
    color: var(--primary-green-dark);
    margin-bottom: 5px;
}
.comm-text p {
    margin: 0;
}

@media (max-width: 768px) {
    .agreement-hero {
        padding: 120px 15px;
        min-height: 350px;
        background-position: center 25%;
    }
    .document-parties {
        flex-direction: column;
    }
    .document-header h2 {
        font-size: 2rem;
    }
    .agreement-document {
        margin-top: -30px;
        padding: 30px 15px;
    }
}