/* Font face declaration */
@font-face {
    font-family: 'HACEN-MAGHREB-BD';
    src: url('../fonts/HACEN-MAGHREB-BD.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}


/* Motto section styles */
.motto-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem auto;
    padding: 0;
}

.motto-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.motto-text {
    font-family: 'HACEN-MAGHREB-BD', Arial, sans-serif;
    color: #D29A87; /* Reddish gold color */
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    
    letter-spacing: 0.7px;
    /* text-transform removed: title case is handled manually in HTML
       to keep prepositions like "by" lowercase */
}

/* Logo section styles */
.logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    position: relative;
}

.center-logo {
    width: 100%;
    max-width: 180px; /* Reduced size to be less prominent */
    height: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
    transform: scale(1); /* Normal size */
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Language switcher styles */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: #8A5A47; /* Dark font color */
    padding: 16px 24px;
    border-radius: 8px;
    border: 2px solid #8A5A47; /* Dark border */
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.language-switcher:hover {
    background: #8A5A47; /* Dark background on hover */
    color: white; /* White text on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments for language switcher */
@media (max-width: 768px) {
    .language-switcher {
        top: 15px;
        right: 15px;
        padding: 12px 18px;
        font-size: 1.1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .language-switcher {
        top: 20px;
        right: 20px;
        padding: 16px 24px;
        font-size: 1.2rem;
    }
}

.center-logo:hover {
    opacity: 1;
    transform: scale(1.02); /* Subtle zoom on hover */
}

/* Cards container styles */
.cards-container {
    width: 100%;
    max-width: 1000px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
}

.card {
    position: relative;
    width: 100%;
    aspect-ratio: 1.4 / 1; /* Set aspect ratio to 1.4:1 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none; /* Remove box-shadow to eliminate spacing */
    transition: transform 0.3s ease;
    transform: scale(0.9); /* Slight scale reduction for reasonable gaps */
}

.card:hover {
    transform: translateY(-5px) scale(1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Image fits perfectly inside the card */
    transition: transform 0.3s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: white;
    opacity: 0.95;
    font-family: Arial, sans-serif;
    font-size: 1.9rem; /* Reduced by 20% from 2rem */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 5px; /* Increased letter spacing */
    background: transparent;
    padding: 1rem 2rem;
    border-radius: 8px;
    backdrop-filter: blur(0px);
    transition: all 0.3s ease;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 1; /* Always visible */
    transition: opacity 0.3s ease;
}

.card:hover .card-overlay {
    opacity: 1; /* Keep visible on hover */
}

.learn-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.3s ease;
}

.learn-more:hover {
    transform: translateX(5px);
}

.arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.learn-more:hover .arrow {
    transform: translateX(3px);
}





/* Main content styles */
.main-content {
    margin-top: 1rem; /* Reduced space for logo section */
    padding: 0;
    text-align: center;
}


/* Responsive design */
@media (max-width: 768px) {
    /* Stack cards vertically on mobile */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Adjust card aspect ratio for mobile */
    .card {
        aspect-ratio: 1.2 / 1;
        margin-bottom: 1rem;
    }
    
    /* Reduce text sizes for mobile */
    .card-text {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }
    
    /* Reduce overlay padding on mobile */
    .card-overlay {
        padding: 1.5rem;
    }
    
    /* Adjust motto text for mobile */
    .motto-text {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
        padding: 1rem;
        line-height: 1.6;
        max-width: 90vw;
        word-wrap: break-word;
    }
    
    /* Adjust logo size for mobile */
    .center-logo {
        max-width: 200px;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    
    /* Adjust container width for mobile */
    .cards-container {
        max-width: 95vw;
        padding: 0 1rem;
    }
    
    /* Reduce main content margin for mobile */
    .main-content {
        margin-top: 0.5rem;
    }
}
@media (min-width: 1200px) 
{
     html, body {
    height: 100%;
    overflow: hidden; /* prevent scroll on desktop */
  }

  body {
    display: flex;
    justify-content: center; /* horizontal center */
    align-items: flex-start; /* top align */
  }
  .container {
    transform: scale(0.67);
    transform-origin: top center;
    width: 100%;
    min-height: 100vh; /* ensures container fills viewport in Chrome */
    box-sizing: border-box;
  }
}

/* Tablet responsive design */
@media (min-width: 769px) and (max-width: 1024px) {
    .card-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .card {
        aspect-ratio: 1.3 / 1;
    }
    
    .card-text {
        font-size: 1.7rem;
        letter-spacing: 4px;
    }
    
    .motto-text {
        font-size: 1.4rem;
        letter-spacing: 0.6px;
    }
    
    .center-logo {
        max-width: 200px;
    }
    
    .cards-container {
        max-width: 95vw;
        padding: 0 2rem;
    }
    
    /* Ensure proper margins on tablet devices */
    .motto-section {
        margin: 1rem auto;
    }
    
    .main-content {
        margin-top: 1rem;
    }
    
    .center-logo {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

/* iPad Pro responsive design */
@media (min-width: 1025px) and (max-width: 1366px) {
    .motto-section {
        margin: 1rem auto;
    }
    
    .main-content {
        margin-top: 1rem;
    }
    
    .center-logo {
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .cards-container {
        max-width: 95vw;
        padding: 0 2rem;
    }
}

/* Large screen responsive adjustments */
@media (min-width: 1400px) {
    .cards-container {
        max-width: 1200px;
    }

    .card-text {
        font-size: 2.2rem;
        letter-spacing: 6px;
    }

    .motto-text {
        font-size: 1.8rem;
        letter-spacing: 0.8px;
    }

    .center-logo {
        max-width: 220px;
    }
}

/* ========================================
   Coming Soon Page Styles
   ======================================== */

.coming-soon-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
}

/* Override the desktop overflow:hidden so coming-soon pages can scroll */
html:has(.coming-soon-container),
html:has(.coming-soon-container) body {
    overflow: auto;
    height: auto;
}

.coming-soon-container .logo-section {
    width: 100%;
}

.coming-soon-hero {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
}

.coming-soon-hero img {
    width: 100%;
    height: auto;
    aspect-ratio: 1.4 / 1;
    object-fit: cover;
    display: block;
}

.coming-soon-card-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.coming-soon-category-name {
    font-family: Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: 0.5rem;
}

.coming-soon-label {
    font-family: 'HACEN-MAGHREB-BD', Arial, sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.95;
}

.coming-soon-heading {
    font-family: 'HACEN-MAGHREB-BD', Arial, sans-serif;
    color: #D29A87;
    font-size: 2.4rem;
    font-weight: 600;
    margin: 2rem 0 1.5rem;
    text-align: center;
    letter-spacing: 1px;
}

.coming-soon-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #8A5A47;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 28px;
    border: 2px solid #8A5A47;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.coming-soon-back:hover {
    background: #8A5A47;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Coming Soon responsive - mobile */
@media (max-width: 768px) {
    .coming-soon-hero {
        max-width: 90vw;
        margin-top: 1.5rem;
    }

    .coming-soon-category-name {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }

    .coming-soon-label {
        font-size: 1.1rem;
    }

    .coming-soon-heading {
        font-size: 1.8rem;
        margin: 1.5rem 0 1rem;
    }

    .coming-soon-back {
        font-size: 1rem;
        padding: 10px 22px;
    }
}

/* Coming Soon responsive - tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .coming-soon-hero {
        max-width: 500px;
    }

    .coming-soon-category-name {
        font-size: 1.9rem;
        letter-spacing: 5px;
    }

    .coming-soon-label {
        font-size: 1.3rem;
    }

    .coming-soon-heading {
        font-size: 2.2rem;
    }
}
