/**
 * ============================================================================
 * GLOBAL STYLES
 * Priya Glam Studio & Academy
 * Shared frontend layout, containers, utilities and global helpers
 * ============================================================================
 *
 * Scope:
 * - Frontend only
 * - Shared structural utilities
 * - No page-specific styling
 *
 * Architecture:
 * Base → Layouts → Components → Utilities → Sections → Pages
 * ============================================================================
 */


/* ============================================================================
   MAIN CONTENT WRAPPER
   ============================================================================ */

.main-content {
    position: relative;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    overflow-x: clip;
}


/* ============================================================================
   ACCESSIBILITY - SKIP TO CONTENT
   ============================================================================ */

.skip-to-content {
    position: fixed;
    top: 0;
    left: var(--spacing-md);

    padding: var(--spacing-sm) var(--spacing-lg);

    background: var(--color-primary-600);
    color: #ffffff;

    border-radius: 0 0 var(--radius-lg) var(--radius-lg);

    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
    line-height: 1.4;
    text-decoration: none;

    box-shadow: var(--shadow-lg);

    transform: translateY(-150%);
    transition:
        transform var(--transition-fast),
        background-color var(--transition-fast);

    z-index: var(--z-tooltip);
}

.skip-to-content:focus,
.skip-to-content:focus-visible {
    transform: translateY(0);
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.skip-to-content:hover {
    background: var(--color-primary-700);
}


/* ============================================================================
   FRONTEND CONTAINER SYSTEM
   ============================================================================ */

/**
 * IMPORTANT:
 * `.container` is also generated by Tailwind.
 *
 * This frontend definition intentionally standardizes it so PHP partials using:
 *
 *     <div class="container">
 *
 * remain centered and consistent throughout the site.
 */

.container,
.container-custom,
.container-narrow,
.container-wide {
    width: 100%;
    margin-inline: auto;
    padding-left: var(--section-padding-x);
    padding-right: var(--section-padding-x);
    box-sizing: border-box;
}

/* Default site container */
.container,
.container-custom {
    max-width: var(--container-max-width);
}

/* Content-heavy / text-focused container */
.container-narrow {
    max-width: var(--container-narrow);
}

/* Large visual sections */
.container-wide {
    max-width: var(--container-wide);
}


/* ============================================================================
   RESPONSIVE CONTAINER PADDING
   ============================================================================ */

@media (max-width: 1199px) {
    .container,
    .container-custom,
    .container-narrow,
    .container-wide {
        padding-left: clamp(1.25rem, 3vw, 2rem);
        padding-right: clamp(1.25rem, 3vw, 2rem);
    }
}

@media (max-width: 767px) {
    .container,
    .container-custom,
    .container-narrow,
    .container-wide {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}


/* ============================================================================
   SECTION SPACING
   ============================================================================ */

.section-padding {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
}

.section-padding-top {
    padding-top: var(--section-padding-y);
}

.section-padding-bottom {
    padding-bottom: var(--section-padding-y);
}


/* ============================================================================
   SECTION WIDTH HELPERS
   ============================================================================ */

.section-full {
    width: 100%;
}

.section-centered {
    width: 100%;
    margin-inline: auto;
}

.content-centered {
    margin-inline: auto;
    text-align: center;
}


/* ============================================================================
   BACKGROUND PATTERNS
   ============================================================================ */

.bg-pattern-dots {
    background-image:
        radial-gradient(
            circle,
            rgba(245, 66, 117, 0.05) 1px,
            transparent 1px
        );

    background-size: 20px 20px;
}

.bg-pattern-grid {
    background-image:
        linear-gradient(
            rgba(245, 66, 117, 0.03) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(245, 66, 117, 0.03) 1px,
            transparent 1px
        );

    background-size: 30px 30px;
}


/* ============================================================================
   OVERLAY UTILITIES
   ============================================================================ */

.overlay-dark,
.overlay-light {
    position: relative;
    isolation: isolate;
}

.overlay-dark::before,
.overlay-light::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.overlay-dark::before {
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.50) 0%,
            rgba(0, 0, 0, 0.72) 100%
        );
}

.overlay-light::before {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.92) 0%,
            rgba(255, 255, 255, 0.82) 100%
        );
}


/* ============================================================================
   IMAGE UTILITIES
   ============================================================================ */

.img-cover,
.img-contain {
    display: block;
    width: 100%;
    height: 100%;
}

.img-cover {
    object-fit: cover;
}

.img-contain {
    object-fit: contain;
}

.img-rounded {
    border-radius: var(--radius-lg);
}

.img-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}


/* ============================================================================
   VISIBILITY / ACCESSIBILITY UTILITIES
   ============================================================================ */

.visually-hidden {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;

    border: 0 !important;
}

[hidden] {
    display: none !important;
}


/* ============================================================================
   INTERACTION UTILITIES
   ============================================================================ */

.no-scroll {
    overflow: hidden !important;
}

.no-select {
    user-select: none;
}

.is-disabled {
    pointer-events: none;
    opacity: 0.55;
    cursor: not-allowed;
}


/* ============================================================================
   LOADING STATE
   ============================================================================ */

.is-loading {
    pointer-events: none;
    opacity: 0.6;
    cursor: wait;
}


/* ============================================================================
   GLOBAL FOCUS BEHAVIOUR
   ============================================================================ */

:where(
    a,
    button,
    input,
    select,
    textarea,
    summary,
    [tabindex]
):focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 3px;
}


/* ============================================================================
   MOTION ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}


/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {

    .skip-to-content,
    .back-to-top,
    .floating-contact-widget,
    .mobile-bottom-cta,
    .page-loader {
        display: none !important;
    }

    .main-content {
        min-height: auto;
        overflow: visible;
    }

    .container,
    .container-custom,
    .container-narrow,
    .container-wide {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}
