/*
 Theme Name:     Crawford Design Group
 Theme URI:      https://crawforddesigngp.com/themes/cdg-custom
 Description:    A professionally engineered child theme designed specifically for you. This theme includes enhanced functionality, custom modules, and optimized performance features to deliver exceptional website experiences. For support or questions, please contact support@crawforddesigngp.com.
 Author:         Crawford Design Group
 Author URI:     https://crawforddesigngp.com
 Template:       Divi
 Version:        3.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:    https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:    cdg-custom
 Domain Path:    /languages
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

/* CSS Custom Properties for better maintainability */
:root {
    --cdg-primary-color: inherit;
    --cdg-secondary-color: inherit;
    --cdg-text-color: inherit;
    --cdg-background-color: inherit;
    --cdg-transition-speed: 0.3s;
    --cdg-transition-easing: ease-in-out;
}

/* Note: Additional styles are handled via wp_add_inline_style() for better performance */

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

/* Optimize font loading */
body {
    font-display: swap;
}

/* Hardware acceleration for smooth animations */
.et_pb_section,
.et_pb_row,
.et_pb_module {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Large screens */
@media only screen and (min-width: 1405px) {
    /* Add large screen specific styles here */
}

/* Tablets in landscape mode */
@media only screen and (min-width: 980px) and (max-width: 1405px) {
    /* Add tablet landscape specific styles here */
}

/* Tablets in portrait mode */
@media only screen and (min-width: 768px) and (max-width: 980px) {
    /* Add tablet portrait specific styles here */
}

/* Mobile devices */
@media only screen and (max-width: 767px) {
    /* Add mobile specific styles here */
}

/* Mobile devices in portrait mode */
@media only screen and (max-width: 767px) and (orientation: portrait) {
    /* Add portrait mobile specific styles here */
}

/* Mobile devices in landscape mode */
@media only screen and (max-width: 767px) and (orientation: landscape) {
    /* Add landscape mobile specific styles here */
}

/* ==========================================================================
   Accessibility Improvements
   ========================================================================== */

/* Focus styles for better keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
}

.skip-link:focus {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
    background: #fff;
    color: #000;
    padding: 10px 20px;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Screen reader text */
.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 !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Visually hidden but accessible */
.visually-hidden {
    position: absolute !important;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px;
    height: 1px;
    word-wrap: normal;
}

/* Clear floats */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    /* Hide unnecessary elements */
    #top-header,
    #main-header,
    #main-footer,
    .et_pb_section_video,
    .et_pb_slider,
    .et_pb_video_box {
        display: none !important;
    }
    
    /* Optimize for printing */
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}