/*
Theme Name: Miracle Computer Technologies
Theme URI: https://miraclecomputer.us
Author: Miracle Computer Technologies
Description: A clean, professional WordPress theme for IT services & support businesses. Blue corporate palette with service cards, technology integrations grid, and contact form. Uses real imagery from miraclecomputer.us.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: miracle-computer-technologies
Tags: blue, corporate, it-services, one-page, custom-menu, featured-images
*/

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --primary-blue:   #1a6496;
  --accent-blue:    #2196c4;
  --light-blue:     #e8f0f6;
  --lighter-blue:   #f0f6fa;
  --bg-gray:        #f5f5f5;
  --text-dark:      #222222;
  --text-body:      #555555;
  --text-light:     #aac4d8;
  --footer-bg:      #1a2a3a;
  --border-color:   #e0e0e0;
  --font-family:    Arial, Helvetica, sans-serif;
  --container-max:  1200px;
}

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

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

body {
  background: #ffffff;
  color: var(--text-dark);
  font-family: var(--font-family);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-family); line-height: 1.25; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ============================================================
   Layout Helpers
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--accent-blue);
  margin: 0 auto;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
  display: inline-block;
  background: var(--accent-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 32px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
  border: none;
}
.btn-primary:hover { background: #1a7da3; }

/* ============================================================
   Header / Navigation
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

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

.site-logo img { height: 50px; width: auto; }
.site-logo a {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-blue);
}

.primary-nav {
  display: flex;
  gap: 1.5rem;
}
.primary-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.2s;
}
.primary-nav a:hover,
.primary-nav a.current-menu-item { color: var(--primary-blue); }

.mobile-toggle {
  display: none;
  color: var(--primary-blue);
  padding: 0.5rem;
}
.mobile-toggle svg { width: 22px; height: 22px; display: block; }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border-color);
  padding: 1rem 0;
}
.mobile-menu.open { display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-menu a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.mobile-menu a:hover,
.mobile-menu a.current-menu-item { color: var(--primary-blue); }

@media (max-width: 767px) {
  .primary-nav { display: none; }
  .mobile-toggle { display: block; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,100,150,0.78);
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 72px 24px;
}
.hero-content h1 {
  color: #ffffff;
  font-size: clamp(26px, 5vw, 48px);
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.2;
}
.hero-content p {
  color: #d6eaf8;
  font-size: clamp(16px, 2.5vw, 22px);
  margin-bottom: 32px;
}

/* ============================================================
   Section Headings
   ============================================================ */
.section-heading {
  text-align: center;
  margin-bottom: 40px;
}
.section-heading h2 {
  color: var(--primary-blue);
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
}
.section-heading.small h2 { font-size: 28px; }

/* ============================================================
   Core Services — bento grid
   ============================================================ */
.section-services { background: #ffffff; padding: 64px 0; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.services-grid .service-large {
  grid-row: span 2;
}
@media (max-width: 900px) {
  .services-grid .service-large { grid-row: auto; }
}

.service-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.service-card:hover {
  box-shadow: 0 8px 24px rgba(26,100,150,0.18);
  transform: translateY(-3px);
}
.service-card .service-img-wrap {
  overflow: hidden;
  height: 200px;
  background: var(--light-blue);
}
.service-card.service-large .service-img-wrap { height: 100%; min-height: 280px; }
.service-card .service-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-card .service-body { padding: 20px 24px 24px; }
.service-card h3 {
  color: var(--primary-blue);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.service-card p {
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.7;
}

/* ============================================================
   Technology Integrations grid
   ============================================================ */
.section-integrations { background: var(--bg-gray); padding: 64px 0; }

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.integration-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.integration-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(26,100,150,0.14);
}
.integration-card .integration-img-wrap {
  height: 130px;
  background: var(--light-blue);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.integration-card .integration-img-wrap img {
  width: 100%;
  height: 100%;
}
.integration-card.cover .integration-img-wrap img { object-fit: cover; padding: 0; }
.integration-card.contain .integration-img-wrap img { object-fit: contain; padding: 10px; }

.integration-card .integration-body { padding: 14px 16px 16px; }
.integration-card .integration-title {
  color: var(--primary-blue);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.integration-card .integration-desc {
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.5;
}

/* ============================================================
   Other Services grid
   ============================================================ */
.section-other { background: #ffffff; padding: 64px 0; }
.section-other h2 {
  color: var(--primary-blue);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 28px;
}

.other-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.other-card {
  background: var(--bg-gray);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
}
.other-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(26,100,150,0.13);
}
.other-card .other-img-wrap {
  height: 150px;
  background: var(--light-blue);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.other-card .other-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.other-card .other-label {
  padding: 12px 16px;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

/* ============================================================
   Contact Section (Homepage)
   ============================================================ */
.section-contact { background: var(--primary-blue); padding: 64px 0; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  align-items: start;
}
.contact-grid h2 {
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 16px;
}
.contact-grid > div:first-child p {
  color: #d6eaf8;
  font-size: 16px;
  line-height: 1.7;
}

.contact-success {
  background: #ffffff;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
}
.contact-success p {
  color: var(--primary-blue);
  font-size: 18px;
  font-weight: 700;
}

/* ============================================================
   Forms
   ============================================================ */
.cma-form { display: flex; flex-direction: column; gap: 14px; }
.cma-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 480px) {
  .cma-form .form-row { grid-template-columns: 1fr; }
}
.cma-form input,
.cma-form textarea {
  background: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-dark);
  width: 100%;
  outline: none;
}
.cma-form input:focus,
.cma-form textarea:focus { border-color: var(--accent-blue); }
.cma-form textarea { resize: vertical; }
.cma-form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 6px;
}
.cma-form button[type="submit"] {
  background: var(--accent-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.2s;
}
.cma-form button[type="submit"]:hover { background: #1a7da3; }

/* ============================================================
   Contact Form Page
   ============================================================ */
.contact-page-header {
  background: var(--primary-blue);
  padding: 40px 0;
}
.contact-page-header h1 {
  color: #ffffff;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
}
.contact-page-header p {
  color: #d6eaf8;
  font-size: 16px;
  margin-top: 8px;
}

.contact-form-section {
  background: var(--bg-gray);
  padding: 60px 0;
  min-height: 60vh;
}
.contact-form-card {
  max-width: 700px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 40px;
}
@media (max-width: 600px) {
  .contact-form-card { padding: 28px 20px; }
}
.contact-form-card h2 {
  color: var(--primary-blue);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
}

.success-state { text-align: center; padding: 40px 0; }
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--lighter-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.success-state h2 { margin-bottom: 10px; }
.success-state p { color: var(--text-body); font-size: 15px; }

/* ============================================================
   Footer
   ============================================================ */
#site-footer {
  background: var(--footer-bg);
  border-top: 3px solid var(--accent-blue);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem 0;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; align-items: center; }
}
.footer-brand p:first-child {
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.footer-brand p:last-child {
  color: var(--text-light);
  font-size: 0.875rem;
}
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a {
  color: var(--text-light);
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-nav a:hover { color: #ffffff; }

/* ============================================================
   Generic Page Content
   ============================================================ */
.page-hero {
  background: var(--primary-blue);
  padding: 40px 0;
}
.page-hero h1 {
  color: #ffffff;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
}
.page-content-section { padding: 60px 0; }
.page-content-section .page-content {
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.8;
}
.page-content-section .page-content h2,
.page-content-section .page-content h3 {
  color: var(--primary-blue);
  margin: 1.5em 0 0.5em;
}
.page-content-section .page-content a { color: var(--accent-blue); text-decoration: underline; }

/* ============================================================
   Admin bar spacing
   ============================================================ */
.admin-bar #site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar #site-header { top: 46px; } }
