/* ================================================
   MARTINEZ OSTA CONSTRUCTION — GLOBAL STYLES
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1a6fc4;
  --primary-dark: #0f4a82;
  --primary-light: #e8f1fa;
  --accent: #c9a84c;
  --accent-light: #f5efd6;
  --dark: #0d1117;
  --dark-mid: #1a2030;
  --charcoal: #2d3548;
  --slate: #5a6478;
  --silver: #8b95a5;
  --light: #f4f6f9;
  --lighter: #f9fafb;
  --white: #ffffff;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --shadow-sm: 0 2px 8px rgba(13,17,23,0.06);
  --shadow-md: 0 8px 30px rgba(13,17,23,0.08);
  --shadow-lg: 0 20px 60px rgba(13,17,23,0.12);
  --shadow-xl: 0 30px 80px rgba(13,17,23,0.16);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ========== UTILITY ========== */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
  display: inline-block;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 20px;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--slate);
  line-height: 1.7;
  max-width: 580px;
}

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 8px 30px rgba(26,111,196,0.35);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 40px rgba(26,111,196,0.45); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: transparent;
  color: var(--charcoal);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1.5px solid rgba(0,0,0,0.15);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: #fff;
  color: var(--primary-dark);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }

/* ========== NAVIGATION ========== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(13,17,23,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.nav-logo img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: contain;
  border: 2px solid var(--primary-light);
}
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.2;
}
.nav-logo-tag {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--slate);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--charcoal);
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--primary); background: var(--primary-light); }
.nav-links a.active { color: #fff; background: var(--primary); }
.nav-links a.active:hover { color: #fff; background: var(--primary-dark); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 10px;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(26,111,196,0.3);
}
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
.nav-phone-link {
  display: none;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-phone-link:hover { color: #fff; }
@media (min-width: 1100px) { .nav-phone-link { display: flex; } }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 900px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 340px;
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    background: var(--dark);
    padding: 100px 24px 40px;
    gap: 12px;
    transition: right 0.4s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,0.3);
  }
  .nav-links.open { right: 0; }
  .nav-links a { display: block; color: rgba(255,255,255,0.9) !important; font-size: 1.3rem; font-weight: 500; padding: 18px 20px; width: 100%; text-align: left; border-radius: 12px; }
  .nav-links a.active { color: #fff !important; background: var(--primary); }
  .nav-links a:hover { background: rgba(255,255,255,0.08) !important; color: #fff !important; }
  .nav-cta { width: 100%; justify-content: center; margin-top: 16px; }
}

/* ========== PAGE HERO (inner pages) ========== */
.page-hero {
  padding: 160px 0 80px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 50%, #152238 100%);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(26,111,196,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 20% 80%, rgba(201,168,76,0.06) 0%, transparent 60%);
}
.page-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.page-hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  line-height: 1.7;
}
.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; }
.page-hero .breadcrumb a:hover { color: var(--accent); }
.page-hero .breadcrumb span { color: rgba(255,255,255,0.3); }

/* ========== CTA SECTION ========== */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #2a8be0 100%);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(201,168,76,0.1) 0%, transparent 50%);
}
.cta-inner { text-align: center; position: relative; z-index: 1; }
.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
}
.cta-inner p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== FOOTER ========== */
.footer {
  padding: 80px 0 32px;
  background: var(--dark);
  color: rgba(255,255,255,0.6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: 16px;
  max-width: 280px;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 5px 0;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.82rem;
}
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
  color: rgba(255,255,255,0.5);
}
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ================================================
   WHATSAPP FLOATING BUTTON
   ================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(37,211,102,0.45), 0 2px 8px rgba(0,0,0,0.15);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.3s ease;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(37,211,102,0.55), 0 4px 16px rgba(0,0,0,0.18);
}
.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: #fff;
  flex-shrink: 0;
}
.whatsapp-float .wa-tooltip {
  position: absolute;
  right: 70px;
  background: rgba(13,17,23,0.88);
  color: #fff;
  font-family: var(--font-body, sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.whatsapp-float:hover .wa-tooltip {
  opacity: 1;
  transform: translateX(0);
}
@media (max-width: 768px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 20px;
    right: 20px;
  }
  .whatsapp-float svg { width: 28px; height: 28px; }
  .whatsapp-float .wa-tooltip { display: none; }
}
