/* ==================== Responsive Design ==================== */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 3rem;
    }

    .property-grid,
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991px) {
    .section-title {
        font-size: 2.2rem;
    }

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

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

    .nav-menu {
        position: fixed;
        top: 130px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 130px);
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 30px;
        gap: 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
    }

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

    /* Language Switcher - stays in navbar on mobile */
    .language-switcher {
        display: flex !important;
        align-items: center;
    }

    .language-switcher .lang-btn {
        background: transparent;
        color: var(--text-dark);
        padding: 8px 12px;
        border: none;
        border-radius: 0;
        font-size: 0.9rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 5px;
        box-shadow: none;
    }

    .language-switcher .lang-btn:hover {
        background: transparent;
        color: var(--text-dark);
        transform: none;
        box-shadow: none;
    }

    .language-switcher .lang-btn i:first-child {
        font-size: 1.1rem;
        color: var(--primary-blue);
    }

    .language-switcher .lang-btn i:last-child {
        display: none;
    }

    .language-switcher .lang-dropdown {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        min-width: 180px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-5px);
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        background: var(--white);
    }

    .language-switcher:hover .lang-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .language-switcher .lang-dropdown a {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .mobile-toggle {
        display: flex;
        z-index: 1002;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Mobile Navigation Menu - samo linkovi */
    .nav-menu {
        position: fixed;
        top: 130px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 130px);
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }

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

    .nav-menu > li:not(.language-switcher) {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu > li:not(.language-switcher):last-of-type {
        border-bottom: none;
    }

    .nav-menu > li:not(.language-switcher) a {
        padding: 18px 25px;
        display: block;
        font-size: 1rem;
        color: var(--text-dark);
        transition: all 0.2s ease;
    }

    .nav-menu > li:not(.language-switcher) a:hover,
    .nav-menu > li:not(.language-switcher) a.active {
        background: var(--light-gray);
        color: var(--primary-blue);
        padding-left: 35px;
    }

    .nav-menu > li:not(.language-switcher) a::after {
        display: none;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

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

    .property-grid,
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767px) {
    :root {
        --section-padding: 60px 0;
    }

    .header-top-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header-contact {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .header-contact a {
        margin-right: 0;
    }

    /* Manji burger menu na mobilnom */
    .nav-menu {
        width: 260px;
    }

    .nav-menu > li:not(.language-switcher) a {
        padding: 16px 20px;
        font-size: 0.95rem;
    }

    /* Language switcher na mobile */
    .language-switcher .lang-btn {
        font-size: 0.85rem;
        gap: 4px;
        padding: 6px 10px;
    }

    .language-switcher .lang-btn i:first-child {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

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

    .hero {
        height: 70vh;
        min-height: 500px;
        margin-top: 150px;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .search-box {
        padding: 25px;
        margin: 0 10px;
    }

    .search-section {
        margin-top: -40px;
    }

    .property-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .property-card,
    .blog-card {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: 10px;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    .property-features {
        flex-wrap: wrap;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.6rem;
    }

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

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

    .logo {
        font-size: 1.5rem;
    }

    .logo-image {
        height: 60px;
    }

    .footer-logo .logo-image {
        height: 70px;
    }

    .logo-icon {
        font-size: 1.7rem;
    }

    .property-title,
    .blog-title {
        font-size: 1.2rem;
    }

    .property-price {
        font-size: 1.3rem;
    }

    .service-card {
        padding: 30px 20px;
    }

    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 1.7rem;
    }

    .service-title {
        font-size: 1.1rem;
    }

    .search-box {
        padding: 20px 15px;
    }

    .lang-dropdown {
        right: -10px;
        min-width: 160px;
    }
}

/* Very small devices (less than 400px) */
@media (max-width: 399px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .property-content,
    .blog-content {
        padding: 20px;
    }

    .footer-main {
        padding: 50px 0 30px;
    }
}

/* Landscape orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 400px;
        padding: 60px 0;
    }

    .nav-menu {
        height: calc(100vh - 70px);
        top: 70px;
    }
}

/* Print styles */
@media print {
    .header-top,
    .mobile-toggle,
    .scroll-to-top,
    .search-section {
        display: none;
    }

    .header {
        position: static;
        box-shadow: none;
    }

    .hero {
        margin-top: 0;
        height: auto;
        padding: 40px 0;
    }

    body {
        font-size: 12pt;
    }
}
