/*
Theme Name: ma-modern
Theme URI: https://dealrelations.com
Description: Reusable M&A advisory website template
Version: 2.0.1
Author: DealRelations Inc.
Author URI: https://dealrelations.com
License: GNU General Public License v2 or later
Text Domain: ma-modern
*/
/* ===================================
   CSS VARIABLES
   =================================== */

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
  --navy: #0b2a4a;
  --blue: #113e6b;
  --light: #f6f8fb;
  --ink: #1b1f27;
  --muted: #64748b;
  --accent: #3b82f6;
  --brand: #003366;
  --radius: 14px;
  --container: 1140px;
  --space: 1.25rem;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  opacity: 0.9;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

h1, h2, h3, h4 {
  font-weight: 600;
  color: #002244;
}

/* ===================================
   CONTAINER
   =================================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */
.site-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo / Branding */
.site-branding {
  flex: 0 0 auto;
}

.site-branding .custom-logo,
.site-branding .custom-logo-link img,
.brand img {
  max-height: 60px;
  width: auto;
  height: auto;
  display: block;
}

.site-branding .site-title,
.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.2px;
}

/* Desktop Navigation */
.main-nav {
  display: block;
}

.main-nav .menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  align-items: center;
}

.main-nav .menu li {
  margin: 0;
}

.main-nav .menu a {
  color: #222;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  display: block;
  transition: color 0.3s ease;
}

.main-nav .menu a:hover {
  color: var(--brand);
}

.main-nav .menu a.cta {
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
}

/* Mobile Menu Toggle Button - HIDDEN by default */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28px;
}

.hamburger span {
  display: block;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hamburger animation when open */
.mobile-menu-toggle.active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ===================================
   HERO SECTION WITH VIDEO
   =================================== */
.hero {
  position: relative;
  height: 90vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.45);
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}

.hero-bg.fade-in {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.55));
  z-index: 1;
}

.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 840px;
  padding: 2rem;
  animation: fadeInHero 1.5s ease forwards;
}

@keyframes fadeInHero {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content .kicker {
  display: inline-block;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--hero-kicker, #cccccc);
  margin-bottom: 1rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--hero-text, #ffffff);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hero-content .lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 2rem;
  color: var(--hero-text, rgba(255, 255, 255, 0.95));
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #dbe3ef;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ===================================
   SECTIONS
   =================================== */
.section {
  padding: 1.5rem 0;
}

.section h2 {
  margin: 0 0 2rem;
  color: var(--navy);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  text-align: center;
}

/* ===================================
   GRID & CARDS
   =================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  border: 1px solid #e5eaf2;
  border-radius: var(--radius);
  padding: 2rem;
  background: #fff;
  box-shadow: 0 2px 6px rgba(3, 10, 18, 0.04);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin: 0 0 1rem;
  color: var(--navy);
  font-size: 1.3rem;
}

.card p {
  color: #555;
  margin: 0;
}

/* ===================================
   DEAL GRID
   =================================== */
.deal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.deal-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.deal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.deal-card h3 {
  font-size: 1.2rem;
  margin: 1rem 0 0.5rem;
  color: var(--navy);
}

.deal-card p {
  color: #555;
  margin: 0;
}

.deal-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ===================================
   TOMBSTONES
   =================================== */
.tombstone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.tombstone-frame {
  border: 1px solid #ccc;
  background: #fff;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.tombstone-logo {
  max-width: 200px;
  margin: 0 auto 1rem;
  display: block;
}

.tombstone-frame h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--navy);
}

.tombstone-text {
  font-size: 1rem;
  color: #444;
}

.company-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.company-description {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #444;
}

.deal-action {
  font-weight: 600;
  letter-spacing: 1px;
  color: #555;
  margin-bottom: 0.5rem;
}

.buyer-name {
  font-size: 2rem;
  font-weight: 700;
  color: #8c3b16;
  margin-bottom: 1rem;
}

.advisor-text {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: #444;
}

.advisor-logo {
  max-width: 180px;
  margin: 1rem auto 0;
}

.tombstone-pagination {
  margin-top: 2rem;
  text-align: center;
}

.tombstone-view-all {
  text-align: center;
  margin-top: 2rem;
}

/* ===================================
   FOOTER
   =================================== */
.site-footer,
footer {
  background: #002244;
  color: #fff;
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
  border-top: 1px solid #e5eaf2;
}

.site-footer a,
footer a {
  color: rgba(255, 255, 255, 0.8);
}

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

/* ===================================
   FOOTER MENU FIX
   =================================== */

.site-footer .menu,
footer .menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer .menu li,
footer .menu li {
  margin-bottom: 0.5rem;
}

.site-footer .menu a,
footer .menu a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s;
}

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

/* ===================================
   MOBILE RESPONSIVE
   =================================== */
@media (max-width: 768px) {
  /* SHOW the hamburger button */
  .mobile-menu-toggle {
    display: block;
  }

  /* HIDE the navigation by default, show only when active */
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    padding: 5rem 2rem 2rem;
    overflow-y: auto;
    z-index: 1000;
  }

  /* Show navigation when active */
  .main-nav.active {
    right: 0;
  }

  /* Stack menu items vertically */
  .main-nav .menu {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .main-nav .menu li {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .main-nav .menu li:last-child {
    border-bottom: none;
  }

  .main-nav .menu a {
    padding: 1rem 0;
    font-size: 1.1rem;
    width: 100%;
  }

  .main-nav .menu a.cta {
    margin-top: 1rem;
    text-align: center;
  }

  /* Dark overlay when menu is open */
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  /* Prevent scrolling when menu is open */
  body.menu-open {
    overflow: hidden;
  }

  /* Adjust logo size on mobile */
  .site-branding .custom-logo,
  .brand img {
    max-height: 50px;
  }

  /* Hero adjustments */
  .hero {
    height: 70vh;
    min-height: 500px;
  }

  .hero-content {
    padding: 1.5rem;
  }

  /* Grid adjustments */
  .grid,
  .deal-grid,
  .tombstone-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Section padding */
  .section {
    padding: 3rem 0;
  }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  .main-nav .menu {
    gap: 1.5rem;
  }

  .main-nav .menu a {
    font-size: 0.95rem;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content .lead {
    font-size: 1rem;
  }

  .card,
  .deal-card,
  .tombstone-frame {
    padding: 1.5rem;
  }
}


