/**
 * ARCHTELIER INTERIORS - Responsive CSS
 * Media queries și adaptări pentru toate dispozitivele
 * 
 * @version 1.0.0
 * @author ARCHTELIER Technical Team
 */

/* ==========================================================================
   BREAKPOINTS DEFINITION
   ========================================================================== */

/* 
   xs: 0-575px     (phones)
   sm: 576-767px   (large phones)
   md: 768-991px   (tablets)
   lg: 992-1199px  (small desktops)
   xl: 1200-1399px (medium desktops)
   xxl: 1400px+    (large desktops)
*/

/* ==========================================================================
   LARGE DESKTOPS (1400px+)
   ========================================================================== */

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 7rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .project-gallery {
        grid-template-columns: repeat(4, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   MEDIUM DESKTOPS (1200px - 1399px)
   ========================================================================== */

@media (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }

    .hero-title {
        font-size: 6rem;
    }

    .project-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   SMALL DESKTOPS (992px - 1199px)
   ========================================================================== */

@media (max-width: 1199px) {
    .container {
        max-width: 960px;
        padding: 0 30px;
    }

    .hero-title {
        font-size: 5rem;
    }

    .hero-subtitle {
        font-size: 1.6rem;
    }

    .about-story {
        gap: 40px;
    }

    .contact-grid {
        gap: 60px;
    }

    .project-info-grid {
        gap: 40px;
    }

    .spiral-navigation {
        right: 30px;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   TABLETS (768px - 991px)
   ========================================================================== */

@media (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 25px;
    }

    /* Typography adjustments */
    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .about-hero h1,
    .projects-hero h1,
    .contact-hero h1,
    .team-hero h1 {
        font-size: 3rem;
    }

    /* Navigation adjustments */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--color-dark);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 999;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-menu li {
        margin: 0 0 20px 0;
    }

    .nav-menu a {
        font-size: 18px;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--color-white);
        font-size: 24px;
        cursor: pointer;
        z-index: 1000;
        position: relative;
    }

    /* Layout adjustments */
    .about-story,
    .contact-grid,
    .project-info-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* Form adjustments */
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Component adjustments */
    .spiral-navigation {
        right: 20px;
        transform: translateY(-50%) scale(0.9);
    }

    .project-filters {
        gap: 15px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    /* Hero adjustments */
    .hero-actions {
        gap: 15px;
    }

    .btn-large {
        padding: 15px 30px;
        font-size: 15px;
    }

    /* Card adjustments */
    .project-card-content {
        padding: 20px;
    }

    .team-member {
        padding: 30px 25px;
    }

    /* AI Chat adjustments */
    .ai-chat-messages {
        height: 350px;
    }

    /* Token/NFT grid adjustments */
    .token-stats,
    .nft-grid,
    .vr-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* ==========================================================================
   LARGE PHONES (576px - 767px)
   ========================================================================== */

@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 20px;
    }

    /* Typography */
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 16px;
    }

    .about-hero h1,
    .projects-hero h1,
    .contact-hero h1,
    .team-hero h1 {
        font-size: 2.5rem;
    }

    .project-detail-title {
        font-size: 2rem;
    }

    /* Spacing adjustments */
    .hero-section {
        height: 80vh;
    }

    .about-hero,
    .projects-hero,
    .contact-hero,
    .team-hero {
        padding: 100px 0 50px;
    }

    .about-content,
    .contact-content {
        padding: 60px 0;
    }

    /* Grid layouts */
    .project-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .values-grid,
    .team-grid,
    .token-stats,
    .nft-grid,
    .vr-showcase {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Navigation adjustments */
    .nav-menu {
        width: 280px;
        padding: 70px 15px 15px;
    }

    .nav-menu a {
        font-size: 16px;
    }

    /* Component adjustments */
    .spiral-navigation {
        display: none; /* Hide on mobile for better UX */
    }

    /* Form adjustments */
    .contact-form {
        padding: 30px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 12px;
    }

    .form-submit {
        padding: 12px 30px;
        font-size: 15px;
    }

    /* Modal adjustments */
    .modal {
        margin: 15px;
        max-width: calc(100vw - 30px);
        max-height: calc(100vh - 30px);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .modal-title {
        font-size: 20px;
    }

    /* Card adjustments */
    .project-card-image {
        height: 200px;
    }

    .project-card-content {
        padding: 20px;
    }

    .project-card-title {
        font-size: 20px;
    }

    .team-member-photo {
        width: 120px;
        height: 120px;
    }

    .team-member-name {
        font-size: 20px;
    }

    /* AI Chat adjustments */
    .ai-chat-container {
        margin: 0 15px;
    }

    .ai-chat-messages {
        height: 300px;
        padding: 15px;
    }

    .message-bubble {
        max-width: 80%;
        padding: 12px;
    }

    .ai-chat-input {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }

    .ai-input {
        border-radius: 6px;
    }

    .ai-send-btn {
        border-radius: 6px;
        padding: 12px;
    }

    /* Project filters */
    .projects-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    /* Project detail adjustments */
    .project-detail-hero {
        height: 50vh;
    }

    .project-detail-overlay {
        padding: 40px 0 20px;
    }

    .project-detail-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .project-images-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .project-image-item img {
        height: 200px;
    }
}

/* ==========================================================================
   PHONES (0 - 575px)
   ========================================================================== */

@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }

    /* Typography */
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 15px;
    }

    .about-hero h1,
    .projects-hero h1,
    .contact-hero h1,
    .team-hero h1 {
        font-size: 2rem;
    }

    .project-detail-title {
        font-size: 1.8rem;
    }

    /* Spacing */
    .hero-section {
        height: 70vh;
    }

    .about-hero,
    .projects-hero,
    .contact-hero,
    .team-hero {
        padding: 80px 0 40px;
    }

    .about-content,
    .contact-content {
        padding: 40px 0;
    }

    /* Navigation */
    .nav-menu {
        width: 250px;
        padding: 60px 10px 10px;
    }

    .nav-menu li {
        margin-bottom: 15px;
    }

    .nav-menu a {
        font-size: 15px;
    }

    /* Header */
    .header {
        padding: 15px 0;
    }

    .logo {
        font-size: 20px;
    }

    /* Forms */
    .contact-form {
        padding: 20px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 10px;
        font-size: 14px;
    }

    .form-label {
        font-size: 13px;
    }

    .form-submit {
        padding: 12px 25px;
        font-size: 14px;
    }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .btn-large {
        padding: 12px 25px;
        font-size: 14px;
    }

    /* Hero actions */
    .hero-actions {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .hero-actions .btn {
        width: 200px;
        justify-content: center;
    }

    /* Cards */
    .project-card-image {
        height: 180px;
    }

    .project-card-content {
        padding: 15px;
    }

    .project-card-title {
        font-size: 18px;
    }

    .project-card-description {
        font-size: 13px;
    }

    .team-member {
        padding: 25px 20px;
    }

    .team-member-photo {
        width: 100px;
        height: 100px;
    }

    .team-member-name {
        font-size: 18px;
    }

    .team-member-bio {
        font-size: 14px;
    }

    /* AI Chat */
    .ai-chat-container {
        margin: 0 10px;
    }

    .ai-chat-header {
        padding: 15px;
        font-size: 14px;
    }

    .ai-chat-messages {
        height: 250px;
        padding: 10px;
    }

    .message-bubble {
        max-width: 85%;
        padding: 10px;
        font-size: 14px;
    }

    .ai-chat-input {
        padding: 10px;
    }

    .ai-input {
        padding: 10px;
        font-size: 14px;
    }

    .ai-send-btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    /* Project detail */
    .project-detail-hero {
        height: 40vh;
    }

    .project-detail-overlay {
        padding: 30px 0 15px;
    }

    .project-detail-content {
        padding: 60px 0;
    }

    .project-images-grid {
        gap: 10px;
    }

    .project-image-item img {
        height: 150px;
    }

    /* Contact details */
    .contact-details li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        margin-bottom: 15px;
    }

    /* Modals */
    .modal {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }

    .modal-title {
        font-size: 18px;
    }

    /* Notifications */
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
        font-size: 14px;
        padding: 12px 15px;
    }

    .notification.show {
        transform: translateY(0);
    }

    /* Values section */
    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .value-item h3 {
        font-size: 20px;
    }

    .value-item p {
        font-size: 14px;
    }

    /* Project filters */
    .projects-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 11px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .projects-search {
        margin-bottom: 30px;
    }

    .search-input {
        padding: 12px 40px 12px 15px;
        font-size: 14px;
    }

    /* Pagination */
    .projects-pagination {
        gap: 5px;
    }

    .pagination-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    /* Stats cards */
    .token-stat,
    .nft-card,
    .vr-experience {
        padding: 20px;
    }

    .token-stat-value {
        font-size: 28px;
    }

    .nft-image {
        height: 200px;
    }

    .vr-preview {
        height: 150px;
        font-size: 36px;
    }

    /* About story */
    .about-story-image img {
        height: 250px;
    }

    /* Contact map */
    .contact-map {
        height: 300px;
        margin-top: 60px;
    }
}

/* ==========================================================================
   SMALL PHONES (320px - 479px)
   ========================================================================== */

@media (max-width: 479px) {
    .container {
        padding: 0 10px;
    }

    /* Typography */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .about-hero h1,
    .projects-hero h1,
    .contact-hero h1,
    .team-hero h1 {
        font-size: 1.8rem;
    }

    /* Navigation */
    .nav-menu {
        width: 220px;
    }

    .logo {
        font-size: 18px;
    }

    /* Forms */
    .contact-form {
        padding: 15px;
    }

    .form-checkbox-label {
        font-size: 12px;
    }

    /* Cards */
    .project-card-content,
    .team-member,
    .token-stat,
    .nft-card,
    .vr-experience {
        padding: 15px;
    }

    .project-card-title {
        font-size: 16px;
    }

    .team-member-name {
        font-size: 16px;
    }

    /* AI Chat */
    .ai-chat-messages {
        height: 200px;
    }

    /* Project detail */
    .project-detail-hero {
        height: 35vh;
    }

    .project-image-item img {
        height: 120px;
    }

    /* Value icons */
    .value-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    /* Stats */
    .token-stat-value {
        font-size: 24px;
    }

    .vr-preview {
        height: 120px;
        font-size: 28px;
    }
}

/* ==========================================================================
   LANDSCAPE ORIENTATION (PHONES)
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        min-height: 400px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .hero-actions {
        gap: 10px;
    }

    .scroll-indicator {
        bottom: 15px;
    }
}

/* ==========================================================================
   HIGH RESOLUTION DISPLAYS (RETINA)
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimizări pentru display-uri retina */
    .logo img,
    .team-member-photo img,
    .project-card-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    /* Font smoothing pentru text clar */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

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

@media print {
    * {
        color: #000 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .header,
    .spiral-navigation,
    .modal-overlay,
    .notification,
    .btn,
    .form-submit {
        display: none !important;
    }

    .container {
        max-width: none !important;
        padding: 0 !important;
    }

    .project-card,
    .team-member,
    .card {
        break-inside: avoid;
        border: 1px solid #ddd !important;
    }

    .hero-section {
        height: auto !important;
        min-height: 200px;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 12px;
        color: #666;
    }

    .project-images-grid,
    .team-grid,
    .values-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ==========================================================================
   DARK MODE PREFERENCES
   ========================================================================== */

@media (prefers-color-scheme: light) {
    /* Opțional: ajustări pentru utilizatorii care preferă tema deschisă */
    /* Pentru moment păstrăm tema întunecată ca design principal */
}

/* ==========================================================================
   REDUCED MOTION PREFERENCES
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-indicator {
        animation: none;
    }

    .loading-spinner {
        animation: none;
        border-top-color: var(--color-gold);
    }

    .loading-dot {
        animation: none;
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   HOVER CAPABILITY
   ========================================================================== */

@media (hover: none) {
    /* Stiluri pentru dispozitive touch care nu suportă hover */
    .project-card:hover,
    .team-member:hover,
    .btn:hover {
        transform: none;
    }

    .project-card-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
    }

    .spiral-nav-tooltip {
        display: none;
    }
}

/* ==========================================================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

@media (prefers-contrast: high) {
    /* Îmbunătățiri pentru contrast ridicat */
    :root {
        --color-gold: #ffff00;
        --color-white: #ffffff;
        --color-dark: #000000;
    }

    .btn,
    .form-input,
    .form-select,
    .form-textarea {
        border-width: 2px;
    }

    .project-card,
    .team-member,
    .card {
        border-width: 2px;
    }
}

/* ==========================================================================
   UTILITIES FOR RESPONSIVE DESIGN
   ========================================================================== */

/* Visibility utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

@media (max-width: 767px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

@media (min-width: 768px) {
    .d-md-up-none { display: none !important; }
    .d-md-up-block { display: block !important; }
    .d-md-up-flex { display: flex !important; }
}

/* Text alignment utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

@media (max-width: 767px) {
    .text-md-center { text-align: center !important; }
    .text-md-left { text-align: left !important; }
}

/* Spacing utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 10px !important; }
.mb-2 { margin-bottom: 20px !important; }
.mb-3 { margin-bottom: 30px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 10px !important; }
.mt-2 { margin-top: 20px !important; }
.mt-3 { margin-top: 30px !important; }

@media (max-width: 767px) {
    .mb-md-0 { margin-bottom: 0 !important; }
    .mb-md-1 { margin-bottom: 8px !important; }
    .mb-md-2 { margin-bottom: 15px !important; }
    
    .mt-md-0 { margin-top: 0 !important; }
    .mt-md-1 { margin-top: 8px !important; }
    .mt-md-2 { margin-top: 15px !important; }
}