/**
 * Pre-Landing Page Styles - FULLY RESPONSIVE
 * Carousel model - one random image per visit/refresh
 * Enhanced for perfect mobile display
 * 
 * @package rprocess-child
 */

/* ============================================
   PRE-LANDING PAGE BASE
   ============================================ */

.pre-landing-page {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.pre-landing-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    overflow: hidden;
    z-index: 99999;
}

/* ============================================
   BACKGROUND IMAGE - FULLY RESPONSIVE
   ============================================ */

.pre-landing-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top; /* Positioned slightly above center to show important content */
    background-repeat: no-repeat;
    z-index: 1;
    animation: fadeInImage 1s ease-in;
}

/* Desktop - keep center focus */
@media (min-width: 1025px) {
    .pre-landing-background {
        background-position: center center;
        background-size: cover;
    }
}

/* Tablet adjustments - focus on upper-middle area */
@media (min-width: 768px) and (max-width: 1024px) {
    .pre-landing-background {
        background-position: center top;
        background-size: cover;
    }
}

/* Mobile Portrait - show upper portion to keep faces visible */
@media (max-width: 767px) and (orientation: portrait) {
    .pre-landing-background {
      display:none !important
    }
}

/* Mobile Landscape - use contain to show full image */
@media (max-width: 767px) and (orientation: landscape) {
    .pre-landing-background {
        background-position: center center;
        background-size: contain; /* Show entire image in landscape */
        background-color: #000; /* Black background for letterboxing */
    }
}

/* Very small mobile - prioritize top content */
@media (max-width: 480px) and (orientation: portrait) {
    .pre-landing-background {
        background-position: center 25%;
    }
}

/* Alternative: Use object-fit for better control with img tag */
.pre-landing-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.pre-landing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00000070;
    z-index: 2;
}

/* ============================================
   CONTENT OVERLAY - SCROLLABLE ON SMALL SCREENS
   ============================================ */

.pre-landing-content {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    padding: 40px 20px;
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling if content is too tall */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Mobile: Adjust content to be scrollable */
@media (max-width: 767px) {
    .pre-landing-content {
        padding: 30px 20px;
        align-items: flex-start;
        padding-top: 60px; /* Add top padding for better mobile display */
    }
	.m-block{display:block !important; max-width:100%;}
	  .pre-landing-background {
      display:none !important
    }
}
.m-block{display:none;}
/* Very small screens */
@media (max-width: 480px) {
    .pre-landing-content {
        padding: 40px 15px 30px;
    }
}

/* Small landscape - make content more compact */
@media (orientation: landscape) and (max-height: 600px) {
    .pre-landing-content {
        padding: 0px;
        align-items: flex-start;
    }
}

.pre-landing-inner {
    max-width: 800px;
    width: 100%;
    text-align: center;
    color: #fff;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Mobile: Ensure content doesn't overflow */
@media (max-width: 767px) {
    .pre-landing-inner {
        max-width: 100%;
        width: 100%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LOGO - CENTERED
   ============================================ */

.pre-landing-logo {
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out 0.5s both;
    text-align: center;
    width: 100%;
  
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pre-landing-logo a {
    display: inline-block;
    text-decoration: none;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1px;
    font-family: 'Work Sans', sans-serif;
    text-align: center;
}

.pre-landing-logo img {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.pre-landing-logo .logo-r {
    color: #ff6b35;
}

.pre-landing-logo .logo-process {
    color: #4ecdc4;
}

@media (max-width: 767px) {
    .pre-landing-logo {
        margin-bottom: 25px;
    }
	.pre-landing-countdown {margin:0 !important;}
	.pre-landing-countdown p {color:#000 !important;}
    .pre-landing-logo a {
        font-size: 32px;
    }
	.pre-landing-button {margin:0 !important;}
    .pre-landing-logo img {
        max-width: 220px;
    }
}

@media (max-width: 480px) {
    .pre-landing-logo a {
        font-size: 28px;
    }
    
    .pre-landing-logo img {
        max-width: 180px;
    }
}

/* ============================================
   TEXT CONTENT - RESPONSIVE
   ============================================ */

.pre-landing-text {
    margin-bottom: 50px;
    animation: fadeIn 1s ease-out 0.7s both;
}

.pre-landing-title {
    font-size: 42px;
    font-weight: 700;
    font-family: 'Work Sans', sans-serif;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: none;
    word-wrap: break-word;
}

.pre-landing-subtitle {
    font-size: 24px;
    font-weight: 600;
    font-family: 'Work Sans', sans-serif;
    margin-bottom: 25px;
    line-height: 1.4;
    text-shadow: none;
    color: rgba(255, 255, 255, 0.95);
    word-wrap: break-word;
}

/* Tablet responsive */
@media (max-width: 991px) {
    .pre-landing-title {
        font-size: 36px;
    }
    
    .pre-landing-subtitle {
        font-size: 22px;
    }
}

/* Mobile responsive */
@media (max-width: 767px) {
    .pre-landing-text {
        margin-bottom: 35px;
    }
    
    .pre-landing-title {
        font-size: 28px;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .pre-landing-subtitle {
        font-size: 18px;
        margin-bottom: 20px;
        line-height: 1.5;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .pre-landing-title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .pre-landing-subtitle {
        font-size: 16px;
        margin-bottom: 15px;
    }
}

.pre-landing-description {
    font-size: 18px;
    font-family: 'Quicksand', sans-serif;
    line-height: 1.8;
    text-shadow: none;
    max-width: 700px;
    margin: 0 auto;
    word-wrap: break-word;
}

@media (max-width: 767px) {
    .pre-landing-description {
        font-size: 15px;
        line-height: 1.6;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .pre-landing-description {
        font-size: 14px;
        line-height: 1.7;
    }
}

.pre-landing-description p {
    margin-bottom: 15px;
}

.pre-landing-description p:last-child {
    margin-bottom: 0;
}

/* ============================================
   ACTION BUTTON - TOUCH-FRIENDLY
   ============================================ */

.pre-landing-actions {
    margin-bottom: 30px;
    animation: fadeInScale 1s ease-out 0.9s both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pre-landing-button {
   display: inline-block;
    text-align: center;
    text-decoration: none;
    padding: 10px 47px;
    background: #A9534C;
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
    font-size: 18px;
    line-height: 22px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 0 30px 30px 0px;
}

.pre-landing-button:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: #024288;
    text-decoration: none;
}

.pre-landing-button:focus {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.pre-landing-button .button-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.pre-landing-button:hover .button-arrow {
    transform: translateX(5px);
}

/* Mobile button - larger touch target */
@media (max-width: 767px) {
    .pre-landing-actions {
        margin-bottom: 25px;
    }
    
    .pre-landing-button {
        padding: 16px 35px;
        font-size: 16px;
        min-height: 50px;
        width: auto;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .pre-landing-button {
        padding: 14px 30px;
        font-size: 15px;
        gap: 10px;
    }
}

/* ============================================
   COUNTDOWN
   ============================================ */

.pre-landing-countdown {
    margin-top: 30px;
    animation: fadeIn 1s ease-out 1.1s both;
}

.pre-landing-countdown p {
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.pre-landing-countdown #countdown-timer {
    font-weight: 700;
    font-size: 16px;
    color: #4ecdc4;
}

@media (max-width: 480px) {
    .pre-landing-countdown p {
        font-size: 13px;
    }
    
    .pre-landing-countdown #countdown-timer {
        font-size: 15px;
    }
}

/* ============================================
   SKIP LINK (ACCESSIBILITY)
   ============================================ */

.pre-landing-skip {
    position: absolute;
    left: -9999px;
    z-index: 999999;
}

.pre-landing-skip:focus {
    left: 20px;
    top: 20px;
    padding: 10px 20px;
    background: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 4px;
}

/* ============================================
   RESPONSIVE DESIGN - ENHANCED
   ============================================ */

@media (max-width: 991px) {
    .pre-landing-inner {
        max-width: 600px;
    }
}

@media (max-width: 767px) {
    .pre-landing-content {
        padding: 30px 15px;
    }

    .pre-landing-inner {
        max-width: 100%;
    }

    .pre-landing-logo {
        margin-bottom: 20px;
    }

    .pre-landing-text {
        margin-bottom: 30px;
		color:#000 !important;
text-shadow:none !important;
    }

    .pre-landing-actions {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .pre-landing-content {
        padding: 0;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION - ENHANCED
   ============================================ */

@media (orientation: landscape) and (max-height: 600px) {
    .pre-landing-content {
        padding: 15px 20px;
        align-items: flex-start;
    }

    .pre-landing-logo {
        margin-bottom: 15px;
    }

    .pre-landing-logo a {
        font-size: 28px;
    }

    .pre-landing-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .pre-landing-subtitle {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .pre-landing-description {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .pre-landing-text {
        margin-bottom: 20px;
    }

    .pre-landing-actions {
        margin-bottom: 15px;
    }
    
    .pre-landing-button {
        padding: 12px 25px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .pre-landing-countdown {
        margin-top: 15px;
    }
}

/* Ultra-wide landscape */
@media (orientation: landscape) and (min-height: 601px) and (max-height: 800px) {
    .pre-landing-title {
        font-size: 32px;
    }
    
    .pre-landing-subtitle {
        font-size: 20px;
    }
}

/* ============================================
   iOS SAFARI SPECIFIC FIXES
   ============================================ */

/* Fix for iOS Safari bottom bar */
@supports (-webkit-touch-callout: none) {
    .pre-landing-container {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
    
    .pre-landing-background {
        height: -webkit-fill-available;
    }
}

/* ============================================
   CROSS-BROWSER COMPATIBILITY
   ============================================ */

/* Flexbox fallbacks */
.pre-landing-content {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
	flex-direction:column;
}

.pre-landing-button {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
}

/* Transform fallbacks */
.pre-landing-button:hover {
    -webkit-transform: translateY(-3px);
    -moz-transform: translateY(-3px);
    -ms-transform: translateY(-3px);
    transform: translateY(-3px);
}

.pre-landing-button:hover .button-arrow {
    -webkit-transform: translateX(5px);
    -moz-transform: translateX(5px);
    -ms-transform: translateX(5px);
    transform: translateX(5px);
}

/* Animation fallbacks */
@-webkit-keyframes fadeInImage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@-webkit-keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

/* Transition fallbacks */
.pre-landing-button,
.pre-landing-button .button-arrow {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Box shadow fallbacks */
.pre-landing-button {
    -webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    -moz-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pre-landing-button:hover {
    -webkit-box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    -moz-box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .pre-landing-container {
        display: none;
    }
}