/*
Theme Name:   Riera Molina
Theme URI:    https://rieramolina.com
Description:  Tema hijo para rieramolina.com — Ingeniería Legal Aplicada
Author:       Daniel Riera Molina
Author URI:   https://rieramolina.com
Template:     generatepress
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  rieramolina
*/

/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
  --navy:        #0a192f;
  --navy-mid:    #0d2540;
  --gold:        #C5A059;
  --gold-light:  #d4b678;
  --white:       #ffffff;
  --gray-100:    #f8f9fa;
  --gray-200:    #e9ecef;
  --gray-500:    #6c757d;
  --gray-700:    #495057;
  --text:        #1a1a2e;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --max-width:   1100px;
  --max-sm:       780px;
  --radius:       2px;
  --transition:   0.3s ease;
}

/* ============================================================
   RESET Y BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ============================================================
   TIPOGRAFÍA GLOBAL
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container    { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.container-sm { max-width: var(--max-sm);    margin: 0 auto; padding: 0 2rem; }

section { padding: 6rem 2rem; }

/* ============================================================
   ELEMENTOS COMPARTIDOS
   ============================================================ */
.section-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
  text-align: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 3rem;
  text-align: center;
}

/* ============================================================
   BARRA DE ANUNCIO
   ============================================================ */
.rm-announcement-bar {
  background: var(--gold);
  padding: 12px 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.rm-announcement-bar p {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.2px;
}

.rm-announcement-bar a {
  font-size: 12px;
  font-weight: 500;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  padding: 5px 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: var(--transition);
  white-space: nowrap;
}

.rm-announcement-bar a:hover {
  background: var(--navy);
  color: var(--gold);
}

/* ============================================================
   NAVEGACIÓN
   ============================================================ */
.rm-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.rm-nav-logo img {
  height: 48px;
  width: auto;
}

.rm-nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.rm-nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: 0.3px;
  transition: color var(--transition);
  position: relative;
}

.rm-nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}

.rm-nav-links a:hover::after,
.rm-nav-links a.active::after { width: 100%; }

.rm-nav-links a:hover { color: var(--navy); }

.rm-nav-cta {
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  background: var(--navy) !important;
  color: var(--white) !important;
  padding: 10px 24px !important;
  transition: background var(--transition) !important;
}

.rm-nav-cta::after { display: none !important; }

.rm-nav-cta:hover {
  background: var(--gold) !important;
  color: var(--navy) !important;
}

.rm-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.rm-nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--navy);
  transition: var(--transition);
}

/* ============================================================
   HERO — VARIANTES
   ============================================================ */

/* Hero centrado (constitución, servicios genéricos) */
.rm-hero {
  background: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Hero con imagen lateral (home, sobre-mi) */
.rm-hero-split {
  background: var(--navy);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.rm-hero-split-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 4rem 6rem 6rem;
  position: relative;
  z-index: 1;
}

.rm-hero-split-right {
  position: relative;
  overflow: hidden;
}

.rm-hero-split-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rm-hero-split-right::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,25,47,0.3), transparent);
}

/* Fondo decorativo compartido */
.rm-hero::before,
.rm-hero-split::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(197,160,89,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 20%, rgba(13,71,161,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.rm-hero-pretitle,
.rm-hero-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: block;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.rm-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 500;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.rm-hero-subtitle {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,0.65);
  max-width: 520px;
  margin-bottom: 3rem;
  line-height: 1.75;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.rm-hero-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 16px 48px;
  transition: var(--transition);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.rm-hero-cta:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.rm-hero-cta-info {
  margin-top: 1.25rem;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 0.8s ease 1s forwards;
}

/* ============================================================
   FOOTER
   ============================================================ */
.rm-footer {
  background: var(--navy);
  padding: 3rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.rm-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.rm-footer-brand img {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  margin-bottom: 1rem;
}

.rm-footer-brand p {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  line-height: 1.7;
}

.rm-footer-col-title {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.rm-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rm-footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}

.rm-footer-links a:hover { color: var(--gold); }

.rm-footer-contact-item {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.5rem;
}

.rm-footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.rm-footer-copyright {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.5px;
}

.rm-footer-legal {
  display: flex;
  gap: 1.5rem;
}

.rm-footer-legal a {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  transition: color var(--transition);
}

.rm-footer-legal a:hover { color: var(--gold); }

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .rm-hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .rm-hero-split-left {
    padding: 5rem 2rem 3rem;
  }
  .rm-hero-split-right {
    height: 55vw;
    min-height: 280px;
  }
  .rm-footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .rm-footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  section { padding: 4rem 1.5rem; }

  .rm-nav-links { display: none; }
  .rm-nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    background: var(--white);
    padding: 2rem;
    border-top: 1px solid var(--gray-200);
    gap: 1.5rem;
    z-index: 999;
  }
  .rm-nav-toggle { display: flex; }

  .rm-hero { padding: 5rem 1.5rem 3rem; }
  .rm-hero-title { font-size: clamp(2rem, 7vw, 3rem); }
}

/* ============================================================
   ANIMACIONES DE SCROLL (controladas por main.js)
   ============================================================ */
.rm-fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.rm-fade-in.rm-visible {
  opacity: 1;
  transform: translateY(0);
}
