/* ========================================
   SENNIK - RESPONSIVE CSS
   Mobile-First Responsive Design
   ======================================== */

/* Mobile First Base Styles (already in main.css) */

/* Tablet Styles */
@media (max-width: 768px) {
    
    /* Typography */
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* Header */
    .header {
        padding: 0.5rem 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo-text {
        font-size: 1.8rem;
    }
    
    .logo-subtitle {
        font-size: 0.8rem;
    }
    
    /* Navigation */
    .main-nav {
        width: 100%;
        justify-content: center;
    }
    
    .nav-list {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    /* Hero Section */
    .hero {
        min-height: 90vh;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    /* Search */
    .search-box {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .search-input {
        padding: 1rem;
        text-align: center;
    }
    
    .search-btn {
        padding: 1rem;
        justify-content: center;
    }
    
    /* Grids */
    .dreams-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Cards */
    .dream-card,
    .category-card {
        padding: 1.5rem;
    }
    
    .dream-title,
    .category-title {
        font-size: 1.3rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .popular-dreams,
    .categories,
    .about {
        padding: 4rem 0;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-title {
        font-size: 1.5rem;
    }
    
    .footer-subtitle {
        font-size: 1.1rem;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .premium-features {
        gap: 0.8rem;
    }
    
    .feature {
        padding: 0.8rem;
    }
    
    /* Content Cards */
    .content-card {
        padding: 1.5rem;
    }
    
    .content-card h1 {
        font-size: 2rem;
    }
    
    .symbol-icon {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }
    
    /* Related Dreams */
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 100%;
    }
    
    .related-item {
        padding: 1rem 0.8rem;
    }
    
    .related-item .dream-icon {
        font-size: 2rem !important;
        width: 50px;
        height: 50px;
        margin-bottom: 0.8rem;
    }
    
    .related-item h4 {
        font-size: 0.9rem;
    }
    
    /* Numbers Section */
    .numbers-section {
        padding: 3rem 0;
    }
    
    .numbers-section .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .numbers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    /* About Sennik - Tablet */
    .about-sennik-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .about-sennik-cta {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .number-card {
        padding: 1rem;
    }
    
    .number-display {
        font-size: 2.5rem;
    }
    
    .number-title {
        font-size: 1rem;
    }
    
    .number-desc {
        font-size: 0.8rem;
    }
    
    .number-cta {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .number-cta h3 {
        font-size: 1.3rem;
    }
    
    .number-cta p {
        font-size: 1rem;
    }
    
    .number-calculator-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Interactive Elements */
    .dream-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
        justify-content: space-between;
    }
    
    .dream-trend {
        font-size: 0.8rem;
    }
    
    .load-more-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    
    /* Typography */
    html {
        font-size: 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Container */
    .container {
        padding: 0 10px;
    }
    
    /* Header */
    .header-content {
        padding: 0.8rem 0;
    }
    
    .logo-text {
        font-size: 1.8rem;
        font-weight: 700;
        color: #8B7EC8;
        font-family: 'Playfair Display', serif;
    }
    
    .logo-subtitle {
        font-size: 0.9rem;
        color: #E8E3F3;
        opacity: 0.8;
    }
    
    .logo-icon {
        font-size: 1.3rem;
    }
    
    /* Force viewport for real iOS devices */
    .logo {
        max-width: calc(100vw - 40px);
        overflow: hidden;
    }
    
    /* Navigation - Mobile Menu */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 11, 61, 0.98);
        border-top: 1px solid rgba(139, 126, 200, 0.3);
        backdrop-filter: blur(10px);
        z-index: 1000;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid rgba(139, 126, 200, 0.1);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero {
        min-height: 80vh;
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
        margin-top: 1rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        line-height: 1.5;
        padding: 0 0.5rem;
    }
    
    /* Search */
    .search-section {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .search-box {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        max-width: 100%;
        margin: 0;
    }
    
    .search-input {
        padding: 1rem;
        font-size: 1rem;
        background: rgba(26, 11, 61, 0.8);
        border: 2px solid rgba(139, 126, 200, 0.3);
        border-radius: 25px;
        width: 100%;
    }
    
    .search-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-height: 48px;
        width: 100%;
        border-radius: 25px;
        justify-content: center;
    }
    
    /* Premium CTA */
    .premium-text {
        font-size: 1rem;
    }
    
    .premium-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Grids */
    .dreams-grid {
        gap: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-grid {
        gap: 1.5rem;
    }
    
    /* Cards */
    .dream-card,
    .category-card {
        padding: 1.2rem;
        min-height: 200px;
    }
    
    .dream-icon,
    .category-icon,
    .about-icon {
        font-size: 3rem;
        margin-bottom: 0.8rem;
    }
    
    .dream-title,
    .category-title {
        font-size: 1.4rem;
    }
    
    .dream-desc,
    .category-desc {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    .dream-volume {
        font-size: 0.9rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        word-wrap: break-word;
        hyphens: auto;
        line-height: 1.3;
    }
    
    .popular-dreams,
    .categories,
    .about {
        padding: 3rem 0;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section {
        padding: 1rem 0;
    }
    
    .footer-title {
        font-size: 1.3rem;
    }
    
    .footer-subtitle {
        font-size: 1rem;
    }
    
    /* Modal */
    .modal-content {
        width: 98%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .premium-features {
        gap: 0.5rem;
    }
    
    .feature {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .feature-icon {
        font-size: 1.2rem;
    }
    
    .form-textarea {
        min-height: 100px;
        padding: 0.8rem;
    }
    
    .form-input {
        padding: 0.8rem;
    }
    
    .form-submit {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Content Cards */
    .content-card {
        padding: 1rem;
    }
    
    .content-card h1 {
        font-size: 1.8rem;
    }
    
    .symbol-icon {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }
    
    /* Breadcrumbs */
    .breadcrumbs {
        padding: 0.5rem 0;
        margin-top: 90px;
    }
    
    .breadcrumb-list {
        font-size: 0.8rem;
        gap: 0.3rem;
    }
    
    /* Related Dreams */
    .related-dreams {
        padding: 1.5rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 100%;
    }
    
    .related-item {
        padding: 1rem;
    }
    
    .related-item .dream-icon {
        font-size: 1.8rem !important;
        width: 45px;
        height: 45px;
        margin-bottom: 0.8rem;
    }
    
    .related-item h4 {
        font-size: 0.8rem;
    }
    
    /* Interpretation Sections */
    .interpretation-section {
        margin-bottom: 2rem;
    }
    
    .interpretation-section h2 {
        font-size: 1.5rem;
    }
    
    .interpretation-section h3 {
        font-size: 1.2rem;
    }
    
    .interpretation-list li {
        padding: 0.3rem 0;
        padding-left: 1.2rem;
        font-size: 0.9rem;
    }
    
    /* Utility Classes for Mobile */
    .mobile-hidden {
        display: none;
    }
    
    .mobile-center {
        text-align: center;
    }
    
    .mobile-full-width {
        width: 100%;
    }
    
    /* FAB */
    .fab {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1.2rem;
    }
    
    /* Tabs */
    .tab-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Accordion */
    .accordion-header {
        padding: 0.8rem;
    }
    
    .accordion-title {
        font-size: 1rem;
    }
    
    .accordion-content {
        padding: 0 0.8rem;
    }
    
    .accordion-item.open .accordion-content {
        padding: 0.8rem;
    }
    
    /* Search Results */
    .search-result-item {
        padding: 1rem;
    }
    
    .search-result-title {
        font-size: 1.1rem;
    }
    
    .search-result-desc {
        font-size: 0.9rem;
    }
    
    .search-result-url {
        font-size: 0.8rem;
    }
    
    /* Notification Toast */
    .notification-toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Numbers Section - Mobile */
    .numbers-section {
        padding: 2rem 0;
    }
    
    .numbers-section .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .numbers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .number-card {
        padding: 1rem;
        min-height: 140px;
        cursor: pointer;
    }
    
    .number-display {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .number-title {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .number-desc {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .number-cta {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .number-cta h3 {
        font-size: 1.1rem;
    }
    
    .number-cta p {
        font-size: 0.9rem;
    }
    
    .number-calculator-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* Number Modal - Mobile */
    .number-calculator {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .number-input {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .calculate-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        justify-content: center;
    }
    
    .number-result {
        padding: 1rem;
    }
    
    .number-result h4 {
        font-size: 1.1rem;
    }
    
    .result-main {
        font-size: 1rem;
    }
    
    .result-details {
        font-size: 0.9rem;
    }
    
    .premium-interpretation-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* Interactive Elements - Mobile */
    .dream-stats {
        flex-direction: column;
        gap: 0.7rem;
        align-items: flex-start;
        justify-content: flex-start;
        margin-top: 1rem;
    }
    
    .dream-category {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
        border-radius: 12px;
        background: rgba(255, 215, 0, 0.15);
    }
    
    .load-more-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    /* About Sennik - Mobile */
    .about-sennik {
        padding: 3rem 0;
    }
    
    .about-sennik .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .about-sennik-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-sennik-item {
        padding: 1.5rem;
    }
    
    .about-sennik-icon {
        font-size: 2.5rem;
    }
    
    .about-sennik-item h3 {
        font-size: 1.1rem;
    }
    
    .about-sennik-cta {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .about-sennik-cta h3 {
        font-size: 1.4rem;
    }
    
    .about-sennik-cta p {
        font-size: 1rem;
    }
    
    .search-focus-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Search Card - Mobile */
    .search-card {
        min-height: 220px;
        padding: 1.2rem;
    }
    
    .search-card .search-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .search-trigger-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        margin-top: 1rem;
    }
}

/* iOS viewport and safe area fixes */
@media (max-width: 480px) {
    .header {
        top: env(safe-area-inset-top, 0) !important;
        padding-top: env(safe-area-inset-top, 0);
    }
    
    .logo-text {
        font-size: 2rem !important;
        font-weight: 700 !important;
        color: #8B7EC8 !important;
        font-family: 'Playfair Display', serif !important;
        white-space: nowrap;
        line-height: 1.2;
    }
    
    .logo-subtitle {
        font-size: 1rem !important;
        color: #E8E3F3 !important;
        opacity: 0.8 !important;
        white-space: nowrap;
        line-height: 1.3;
    }
    
    .logo-icon {
        font-size: 1.5rem !important;
    }
    
    /* Ensure hero section accounts for safe area with extra spacing */
    .hero {
        padding-top: calc(env(safe-area-inset-top, 0) + 100px) !important;
    }
}

/* Extra Small Mobile (iPhone SE, small phones) */
@media (max-width: 375px) {
    
    /* Even smaller adjustments for tiny screens */
    .container {
        padding: 0 8px;
    }
    
    .search-section {
        padding: 0 0.5rem;
    }
    
    .search-input {
        font-size: 0.95rem;
        padding: 0.9rem;
    }
    
    .search-btn {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }
    
    .dream-card,
    .category-card {
        padding: 1rem;
        min-height: 180px;
    }
    
    .dream-title,
    .category-title {
        font-size: 1.3rem;
    }
    
    .dream-desc,
    .category-desc {
        font-size: 1rem;
    }
    
    .numbers-grid {
        gap: 0.8rem;
    }
    
    .number-card {
        min-height: 120px;
        padding: 0.8rem;
    }
    
    .number-display {
        font-size: 2.2rem;
    }
    
    .search-card {
        min-height: 200px;
        padding: 1rem;
    }
    
    .search-trigger-btn {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }
}

/* Large Desktop Styles */
@media (min-width: 1400px) {
    
    /* Container */
    .container {
        max-width: 1400px;
        padding: 0 2rem;
    }
    
    /* Typography */
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    /* Grids */
    .dreams-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .about-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    /* Cards */
    .dream-card,
    .category-card {
        padding: 2.5rem;
    }
    
    .dream-icon,
    .category-icon {
        font-size: 3.5rem;
    }
    
    /* Sections */
    .popular-dreams,
    .categories,
    .about {
        padding: 8rem 0;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .logo-icon,
    .dream-icon,
    .category-icon,
    .about-icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-bg {
        animation: none;
    }
    
    .logo-icon {
        animation: none;
    }
    
    .premium-icon {
        animation: none;
    }
    
    .star {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Already dark theme, but can add overrides if needed */
}

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .header,
    .footer,
    .premium-modal,
    .fab {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    .content-card {
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
    
    .section-title {
        border-bottom: 2px solid #ccc !important;
        padding-bottom: 10px !important;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        min-height: 100vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .search-section {
        margin-bottom: 2rem;
    }
}

/* ========================================
   ALPHABET SECTION RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .alphabet-section {
        padding: 3rem 0;
    }
    
    .alphabet-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .alphabet-card {
        padding: 1.5rem 0.75rem;
        min-height: 100px;
    }
    
    .alphabet-letter {
        font-size: 2.5rem;
    }
    
    .alphabet-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .alphabet-section {
        padding: 2rem 0;
    }
    
    .alphabet-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .alphabet-card {
        padding: 1rem 0.5rem;
        min-height: 80px;
    }
    
    .alphabet-letter {
        font-size: 2rem;
        margin-bottom: 0.25rem;
    }
    
    .alphabet-desc {
        font-size: 0.75rem;
        line-height: 1.2;
    }
}