/*
Theme Name: Corporate Pro — Elementor Theme v2
Theme URI: https://example.com
Author: iECnet
Description: Professional WordPress theme with built-in Global Colors, Global Typography, Custom Fonts, Adobe Fonts, Header/Footer Template Builder, Page Layout options, Motion Effects, and Custom CSS — mirroring Elementor Pro Theme Style features. Fully compatible with Elementor Free and Pro.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.5
License: GNU General Public License v2 or later
Text Domain: corp-pro
Tags: elementor, full-width-template, custom-colors, custom-typography, theme-style, header-footer-builder
*/

/* ==================================================================
   CSS CUSTOM PROPERTIES
   Populated dynamically from Customizer via global-styles.php
   Use var(--cp-*) anywhere in your templates or custom CSS
================================================================== */
:root {
  /* ── Colors (overridden by Customizer) */
  --cp-primary:    #1a3c5e;
  --cp-secondary:  #2980b9;
  --cp-accent:     #e8b84b;
  --cp-dark:       #0f2337;
  --cp-light:      #f0f4f8;
  --cp-text:       #2d3748;
  --cp-muted:      #64748b;
  --cp-white:      #ffffff;
  --cp-success:    #27ae60;
  --cp-danger:     #e74c3c;

  /* ── Typography (overridden by Customizer) */
  --cp-font-body:     'Inter', sans-serif;
  --cp-font-heading:  'Inter', sans-serif;
  --cp-font-size:     16px;
  --cp-line-height:   1.7;
  --cp-font-weight:   400;
  --cp-para-spacing:  1em;

  /* ── Heading Sizes */
  --cp-h1-size:   52px;
  --cp-h2-size:   40px;
  --cp-h3-size:   30px;
  --cp-h4-size:   22px;
  --cp-h5-size:   18px;
  --cp-h6-size:   15px;
  --cp-h-weight:  800;
  --cp-h-color:   #1a3c5e;
  --cp-h-lh:      1.2;

  /* ── Links */
  --cp-link-color:       #2980b9;
  --cp-link-hover:       #1a3c5e;
  --cp-link-decoration:  none;

  /* ── Buttons */
  --cp-btn-bg:           #1a3c5e;
  --cp-btn-color:        #ffffff;
  --cp-btn-hover-bg:     #2980b9;
  --cp-btn-hover-color:  #ffffff;
  --cp-btn-radius:       50px;
  --cp-btn-py:           14px;
  --cp-btn-px:           32px;
  --cp-btn-weight:       600;
  --cp-btn-transform:    none;

  /* ── Form Fields */
  --cp-field-border:       #d1d5db;
  --cp-field-focus:        #2980b9;
  --cp-field-radius:       8px;
  --cp-field-padding:      12px 16px;
  --cp-field-bg:           #ffffff;
  --cp-field-text:         #2d3748;
  --cp-field-placeholder:  #94a3b8;

  /* ── Spacing */
  --cp-container:   1200px;
  --cp-section-py:  90px;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }

/* ==================================================================
   HEADINGS — all driven by CSS variables
================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--cp-font-heading);
  font-weight: var(--cp-h-weight);
  line-height: var(--cp-h-lh);
  color: var(--cp-h-color);
  margin-bottom: 0.5em;
}
h1 { font-size: var(--cp-h1-size); }
h2 { font-size: var(--cp-h2-size); }
h3 { font-size: var(--cp-h3-size); }
h4 { font-size: var(--cp-h4-size); }
h5 { font-size: var(--cp-h5-size); }
h6 { font-size: var(--cp-h6-size); }

p { margin-bottom: var(--cp-para-spacing); }

a {
  color: var(--cp-link-color);
  text-decoration: var(--cp-link-decoration);
  transition: color 0.2s;
}
a:hover { color: var(--cp-link-hover); }

/* ==================================================================
   BUTTONS
================================================================== */
.btn, button, input[type="submit"], input[type="button"] {
  display: inline-block;
  background-color: var(--cp-btn-bg);
  color: var(--cp-btn-color);
  border: 2px solid var(--cp-btn-bg);
  border-radius: var(--cp-btn-radius);
  padding: var(--cp-btn-py) var(--cp-btn-px);
  font-family: var(--cp-font-body);
  font-size: 15px;
  font-weight: var(--cp-btn-weight);
  text-transform: var(--cp-btn-transform);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.15s, box-shadow 0.25s;
  line-height: 1;
  text-decoration: none;
}
.btn:hover, button:hover, input[type="submit"]:hover {
  background-color: var(--cp-btn-hover-bg);
  color: var(--cp-btn-hover-color);
  border-color: var(--cp-btn-hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.btn-outline {
  background: transparent;
  color: var(--cp-btn-bg);
  border-color: var(--cp-btn-bg);
}
.btn-outline:hover {
  background: var(--cp-btn-bg);
  color: var(--cp-btn-color);
}
.btn-sm { padding: 10px 22px; font-size: 13px; }
.btn-lg { padding: 18px 40px; font-size: 17px; }

/* ==================================================================
   FORM FIELDS
================================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: var(--cp-field-padding);
  background: var(--cp-field-bg);
  color: var(--cp-field-text);
  border: 1px solid var(--cp-field-border);
  border-radius: var(--cp-field-radius);
  font-family: var(--cp-font-body);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--cp-field-placeholder); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--cp-field-focus);
  box-shadow: 0 0 0 3px rgba(41,128,185,0.15);
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--cp-text);
  margin-bottom: 6px;
}

/* ==================================================================
   LAYOUT CONTAINERS
================================================================== */
.cp-container {
  max-width: var(--cp-container);
  margin: 0 auto;
  padding: 0 24px;
}
.cp-section { padding: var(--cp-section-py) 0; }

/* ==================================================================
   ELEMENTOR COMPATIBILITY
================================================================== */
.elementor-section.elementor-section-stretched {
  width: 100vw !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}
.elementor-page .entry-header,
.elementor-page .entry-footer { display: none; }
.elementor-page .site-main,
.elementor-page #main { padding: 0 !important; margin: 0 !important; }
.elementor-page article { padding: 0; margin: 0; }

/* ==================================================================
   MOTION EFFECTS
   Controlled via Customizer — JS toggles classes
================================================================== */
[data-cp-animate] { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-cp-animate].cp-animated { opacity: 1; transform: none; }
[data-cp-animate="fade-left"]  { transform: translateX(-40px); }
[data-cp-animate="fade-right"] { transform: translateX(40px); }
[data-cp-animate="fade-down"]  { transform: translateY(-30px); }
[data-cp-animate="zoom-in"]    { transform: scale(0.85); }
[data-cp-animate].cp-animated  { transform: none; opacity: 1; }

/* Parallax container */
.cp-parallax { position: relative; overflow: hidden; }
.cp-parallax-bg {
  position: absolute; inset: -60px 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

/* ==================================================================
   STICKY HEADER
================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.12); }

/* ==================================================================
   TOPBAR
================================================================== */
.cp-topbar {
  background: var(--cp-dark);
  padding: 8px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}
.cp-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.cp-topbar-left { display: flex; gap: 24px; align-items: center; }
.cp-topbar-left span { display: flex; gap: 6px; align-items: center; }
.cp-topbar-left i { color: var(--cp-accent); font-size: 11px; }
.cp-topbar-right { display: flex; gap: 8px; }
.cp-topbar-right a {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: background 0.2s, color 0.2s;
}
.cp-topbar-right a:hover { background: var(--cp-accent); color: var(--cp-dark); }

/* ==================================================================
   NAVBAR
================================================================== */
.cp-navbar {
  background: #fff;
  padding: 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.cp-navbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}
.cp-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.cp-logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--cp-primary), var(--cp-secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.cp-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.cp-logo-name { font-size: 17px; font-weight: 800; color: var(--cp-primary); }
.cp-logo-tagline { font-size: 11px; color: var(--cp-muted); letter-spacing: 0.5px; }

.cp-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.cp-nav ul { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; }
.cp-nav ul li { position: relative; }
.cp-nav ul li a {
  display: block;
  padding: 8px 14px;
  font-size: 14px; font-weight: 500;
  color: var(--cp-text);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.cp-nav ul li a:hover,
.cp-nav ul .current-menu-item > a,
.cp-nav ul .current-menu-ancestor > a { color: var(--cp-primary); background: var(--cp-light); }

/* Dropdown */
.cp-nav ul li ul {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  min-width: 200px;
  padding: 8px 0;
  z-index: 9998;
  flex-direction: column;
}
.cp-nav ul li:hover > ul { display: flex; }
.cp-nav ul li ul li a { border-radius: 0; padding: 10px 18px; }

.cp-nav-cta {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--cp-primary), var(--cp-secondary));
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600; font-size: 14px;
  transition: opacity 0.2s, transform 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.cp-nav-cta:hover { opacity: 0.9; transform: translateY(-1px); color: #fff !important; }

.cp-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px; margin-left: auto;
}
.cp-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--cp-primary); border-radius: 2px; transition: all 0.3s;
}
.cp-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.cp-hamburger.open span:nth-child(2) { opacity: 0; }
.cp-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==================================================================
   FOOTER
================================================================== */
.cp-footer { background: var(--cp-dark); color: rgba(255,255,255,0.75); }
.cp-footer-top { padding: 64px 0 40px; }
.cp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.cp-footer-logo-name { font-size: 18px; font-weight: 800; color: #fff; }
.cp-footer-logo-tagline { font-size: 11px; color: rgba(255,255,255,0.4); }
.cp-footer-desc { font-size: 14px; margin-top: 14px; line-height: 1.7; }
.cp-footer-social { display: flex; gap: 10px; margin-top: 20px; }
.cp-footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: background 0.2s, color 0.2s;
}
.cp-footer-social a:hover { background: var(--cp-accent); color: var(--cp-dark); }
.cp-footer-col h5 {
  font-size: 13px; font-weight: 700; color: #fff;
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 18px;
}
.cp-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cp-footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.cp-footer-col ul li a:hover { color: var(--cp-accent); }
.cp-footer-contact { display: flex; flex-direction: column; gap: 14px; list-style: none; }
.cp-footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: rgba(255,255,255,0.65); }
.cp-footer-contact li i { color: var(--cp-accent); margin-top: 3px; flex-shrink: 0; }
.cp-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
}
.cp-footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; font-size: 13px; color: rgba(255,255,255,0.35);
}

/* ==================================================================
   PAGE LAYOUT COLUMNS
================================================================== */
.cp-layout-sidebar-right { display: grid; grid-template-columns: 1fr 300px; gap: 48px; }
.cp-layout-sidebar-left  { display: grid; grid-template-columns: 300px 1fr; gap: 48px; }
.cp-layout-two-col       { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.cp-layout-three-col     { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
.cp-col-33  { flex: 0 0 33.333%; max-width: 33.333%; }
.cp-col-50  { flex: 0 0 50%; max-width: 50%; }
.cp-col-66  { flex: 0 0 66.666%; max-width: 66.666%; }
.cp-col-25  { flex: 0 0 25%; max-width: 25%; }
.cp-col-75  { flex: 0 0 75%; max-width: 75%; }

/* ==================================================================
   BACK TO TOP
================================================================== */
.cp-back-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 46px; height: 46px;
  background: var(--cp-primary);
  color: #fff; border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  z-index: 999;
}
.cp-back-top.visible { opacity: 1; transform: none; }
.cp-back-top:hover { background: var(--cp-secondary); }

/* ==================================================================
   RESPONSIVE
================================================================== */
@media (max-width: 1024px) {
  .cp-footer-grid { grid-template-columns: 1fr 1fr; }
  .cp-layout-sidebar-right,
  .cp-layout-sidebar-left { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root {
    --cp-h1-size: 36px;
    --cp-h2-size: 28px;
    --cp-h3-size: 22px;
    --cp-section-py: 60px;
  }
  .cp-topbar { display: none; }
  .cp-nav { display: none; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; padding: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.1); z-index: 9998; }
  .cp-nav.open { display: flex; }
  .cp-nav ul { flex-direction: column; width: 100%; }
  .cp-nav ul li a { padding: 12px 16px; }
  .cp-hamburger { display: flex; }
  .cp-nav-cta { display: none; }
  .cp-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cp-footer-bottom-inner { flex-direction: column; text-align: center; }
  .cp-layout-two-col,
  .cp-layout-three-col { grid-template-columns: 1fr; }
}
