/*!
Theme Name: DigifyTech Theme
Theme URI: https://mvtvn78.github.io/My_Portfolio/
Description: Một theme WordPress hiện đại và chuyên nghiệp được thiết kế cho các website kinh doanh. Theme cung cấp cấu trúc block-based, responsive design, và dễ dàng tùy chỉnh thông qua theme.json.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Author: mvtvn78
Author URI: https://mvtvn78.github.io/My_Portfolio/
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mvtbusiness
Domain Path: /languages
Tags: business, responsive, block-theme, custom-colors, custom-logo, custom-menu, featured-images, full-site-editing
*/

/* Custom CSS for DigifyTech Theme */

:root {
  --primary-color: #3b82f6;
  --secondary-color: #1e293b;
  --text-color: #ffffff;
  --background-color: #ffffff;
  --border-color: #e2e8f0;
  --light-gray: #f1f5f9;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  font-size: 16px;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}


/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  font-weight: 600;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

/* Code blocks */
code, pre {
  background-color: var(--light-gray);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  padding: 0;
  background-color: transparent;
}

/* Buttons */
.wp-block-button__link {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 500;
  display: inline-block;
}

.wp-block-button__link:hover {
  background-color: #2563eb;
  border-color: #2563eb;
  color: white;
  text-decoration: none;
}

.wp-block-button__link:active {
  transform: scale(0.98);
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-family: inherit;
  font-size: inherit;
  background-color: var(--background-color);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: var(--light-gray);
  font-style: italic;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: var(--light-gray);
  font-weight: 600;
  color: var(--secondary-color);
}

tr:nth-child(even) {
  background-color: var(--light-gray);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 1rem 0;
}

figcaption {
  font-size: 0.875rem;
  color: var(--text-color);
  margin-top: 0.5rem;
  font-style: italic;
}


.wp-block-navigation {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.wp-block-navigation a {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

.wp-block-navigation a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.wp-block-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.wp-block-column {
  min-width: 0;
}

/* Separators */
.wp-block-separator {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 2rem 0;
}

.wp-block-separator.is-style-wide {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

/* Spacing utilities */
.wp-block-group.has-top-margin {
  margin-top: 2rem;
}

.wp-block-group.has-bottom-margin {
  margin-bottom: 2rem;
}

/* Cards/Boxes */
.wp-block-group.is-style-card {
  background-color: var(--light-gray);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.125rem;
  }

  body {
    font-size: 15px;
  }

  .wp-block-navigation {
    flex-direction: row-reverse;
    gap: 1rem;
    width: 100%;
  }

  .wp-block-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  .wp-block-button__link {
    width: 100%;
    text-align: center;
  }
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}

/* Hero Video Section */
.wp-block-group[style*="aspect-ratio:16/9"] {
  position: relative !important;
  width: 100% !important;
  min-height: 60vh;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.wp-block-group[style*="aspect-ratio:16/9"] video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

@media (max-width: 768px) {
  .wp-block-group[style*="aspect-ratio:16/9"] {
    min-height: 50vh;
  }
  
  .wp-block-group[style*="aspect-ratio:16/9"] video {
    object-fit: cover;
  }
}
