/*
Theme Name: Vyral Agency
Theme URI: https://vyralagency.com
Author: Vyral Agency Team
Author URI: https://vyralagency.com
Description: A modern, high-performance, strictly greyscale custom WordPress block theme designed for digital agencies.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vyral-agency
Tags: full-site-editing, block-patterns, custom-colors, responsive-layout, translation-ready
*/

/* --- Core Theme Styles --- */

/* Reset & Scroll Behavior */
html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Custom Scrollbar for premium dark/greyscale aesthetic */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* Selection highlight */
::selection {
    background-color: #ffffff;
    color: #000000;
}

/* Focus styles for accessibility */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Header Sticky styling helper */
.vyral-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Standard WP Logo and Site Title styles */
.wp-block-site-logo {
    display: inline-block;
    vertical-align: middle;
}

.wp-block-site-logo img {
    height: auto;
    max-width: 100%;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.wp-block-site-logo img:hover {
    filter: grayscale(0%);
}

/* Smooth layout grid outlines for premium touch */
.vyral-grid-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vyral-grid-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    background-color: rgba(255, 255, 255, 0.02) !important;
}

/* Custom text underline hover effect */
.vyral-link-hover {
    position: relative;
    text-decoration: none;
}

.vyral-link-hover::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.vyral-link-hover:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Input Fields styling overrides */
input[type="text"],
input[type="email"],
textarea {
    background-color: #121212 !important;
    border: 1px solid #2a2a2a !important;
    color: #ffffff !important;
    border-radius: 0 !important;
    padding: 1rem !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: #ffffff !important;
    box-shadow: 0 0 0 1px #ffffff !important;
    outline: none !important;
}

/* Section divider class to prevent inline style mismatches in block files */
.vyral-section-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 6rem;
}

/* WhatsApp direct CTA button styled natively */
.vyral-whatsapp-btn {
    display: inline-block;
    background-color: #ffffff;
    color: #000000;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid #ffffff;
    text-align: center;
}

.vyral-whatsapp-btn:hover {
    background-color: transparent;
    color: #ffffff;
}

/* Spotlight Highlight details */
.vyral-spotlight-card {
    background-color: #121212;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    transition: border-color 0.4s ease;
}

.vyral-spotlight-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- Mobile Responsiveness and Grid Overrides --- */

/* Alignments and padding resets for small viewports */
@media (max-width: 782px) {
    /* Restore full structural width for all major content wrappers on mobile */
    .wp-block-group.alignwide,
    .wp-block-group:not(.alignfull),
    .wp-block-columns,
    .vyral-spotlight-card,
    .vyral-stagger-grid {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Apply a comfortable standard mobile padding (1.5rem) to full width blocks to keep text from touching screen edges */
    .wp-block-group.alignfull {
        width: 100% !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        box-sizing: border-box !important;
    }

    /* Apply a standard side padding of 1.25rem (20px) to nested content layout modules */
    .wp-block-group.alignwide,
    .wp-block-column,
    .vyral-spotlight-card {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        box-sizing: border-box !important;
    }

    .wp-block-columns.vyral-stagger-grid {
        flex-direction: column !important;
        gap: 1.5rem !important;
        width: 100% !important;
    }

    .wp-block-column {
        flex-basis: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Reduce huge vertical spacing on mobile */
    .wp-block-group[style*="padding-top"] {
        padding-top: clamp(4rem, 10vw, 6rem) !important;
    }
    .wp-block-group[style*="padding-bottom"] {
        padding-bottom: clamp(4rem, 10vw, 6rem) !important;
    }

    .wp-block-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .wp-block-button,
    .wp-block-button__link {
        width: 100% !important;
        text-align: center;
    }

    /* Spotlight details */
    .spotlight-stats {
        flex-direction: column;
        gap: 1rem !important;
    }
}
