/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #2c5aa0;
    font-weight: 600;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2c5aa0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2c5aa0;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(44, 90, 160, 0.7), rgba(44, 90, 160, 0.1)),
                url('https://www.apartmanija.hr/slike/apartments/Anamarija_1b0480363a70.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(44, 90, 160, 0.8), rgba(52, 152, 219, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 300;
    animation: fadeInUp 1s ease 0.2s both;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: #fff;
    color: #2c5aa0;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.4s both;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-actions {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.video-play-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.6s both;
    padding: 10px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-play-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.video-play-button:hover .play-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.9);
    color: #2c5aa0;
}

.play-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-icon i {
    font-size: 1.2rem;
    margin-left: 2px; /* Optical alignment for play icon */
}

.video-play-button span {
    font-weight: 500;
    font-size: 1rem;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.video-modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.video-close:hover {
    color: #2c5aa0;
}

.video-modal video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

/* Video modal animations */
.video-modal.show {
    display: block;
    animation: modalFadeIn 0.3s ease;
}

.video-modal.show .video-modal-content {
    animation: modalSlideIn 0.3s ease;
}

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

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

/* Responsive video modal */
@media (max-width: 768px) {
    .video-modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .video-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

/* About Section */
.about {
    padding: 100px 0;
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.lead {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.8;
}

.location-info {
    margin-top: 2rem;
}

.location-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: #555;
}

.location-item i {
    color: #2c5aa0;
    margin-right: 1rem;
    font-size: 1.1rem;
    width: 20px;
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.02);
}

/* Amenities Section */
.amenities {
    padding: 100px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #2c5aa0;
    margin-bottom: 3rem;
    font-weight: 600;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.amenity-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.amenity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.amenity-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2c5aa0, #3498db);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.amenity-icon i {
    font-size: 2rem;
    color: white;
}

.amenity-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.amenity-card p {
    color: #666;
    line-height: 1.6;
}

/* Showcase Section */
.showcase {
    padding: 100px 0;
    background: white;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Property Images Gallery */
.property_imgs {
    margin-top: 2rem;
}

.property_imgs .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    height: 500px;
}

.property_imgs .first {
    position: relative;
}

.property_imgs .second {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
}

.primary_img,
.secondary_img,
.secondary_img div {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Fix for secondary images that use background style directly */
.secondary_img {
    background-size: cover !important;
    background-position: center !important;
}

.primary_img:hover,
.secondary_img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.primary_img div,
.secondary_img div div,
.secondary_img > div {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1.5rem;
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s ease;
}

.primary_img:hover div,
.secondary_img:hover div div,
.secondary_img:hover > div {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.primary_img span,
.secondary_img span {
    font-weight: 600;
    font-size: 1rem;
}

.primary_img span i,
.secondary_img span i {
    margin-right: 0.5rem;
}

.property_video {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.property_video .fa-play {
    position: absolute;
    color: white;
    font-size: 3rem;
    z-index: 2;
    background: rgba(44, 90, 160, 0.9);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.property_video:hover .fa-play {
    background: rgba(44, 90, 160, 1);
    transform: scale(1.1);
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
    .property_imgs .row {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1rem;
    }
    
    .property_imgs .first {
        height: 300px;
    }
    
    .property_imgs .second {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 150px 150px;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .property_imgs .second {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 150px);
    }
    
    .property_imgs .first {
        height: 250px;
    }
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.showcase-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.showcase-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.showcase-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.showcase-item:hover .showcase-overlay {
    transform: translateY(0);
}

.showcase-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.showcase-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

/* Reviews Section */
.reviews {
    padding: 100px 0;
    background: #f8f9fa;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.review-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.review-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: #2c5aa0;
    line-height: 1;
    font-family: Georgia, serif;
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.review-stars {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.review-stars i {
    color: #ffc107;
    font-size: 1rem;
}

.review-text {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
    font-size: 1rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info h4 {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.author-info span {
    color: #888;
    font-size: 0.9rem;
}

.reviews-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.summary-item {
    text-align: center;
    padding: 1rem;
}

.summary-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 0.5rem;
}

.summary-text {
    color: #666;
}

.summary-stars {
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
}

.summary-stars i {
    color: #ffc107;
    font-size: 0.9rem;
}

/* FAQ Section */
.faq {
    padding: 100px 0;
    background: #f8f9fa;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question h3 {
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
}

.faq-question i {
    color: #2c5aa0;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    color: #2c5aa0;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-info p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: #555;
}

.contact-item i {
    color: #2c5aa0;
    margin-right: 1rem;
    font-size: 1.1rem;
    width: 20px;
}

.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #2c5aa0, #3498db);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.4);
}

/* Map Section */
.map-section {
    margin-top: 4rem;
    text-align: center;
}

.map-section h3 {
    color: #2c5aa0;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.property_map {
    margin-bottom: 2rem;
}

.location-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.location-detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.location-detail-item i {
    color: #2c5aa0;
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.location-detail-item h4 {
    color: #333;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.location-detail-item p {
    color: #666;
    margin: 0;
}

/* Custom map marker styling */
.custom-div-icon {
    background: transparent !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2) !important;
}

.leaflet-popup-tip {
    background: white !important;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #3498db;
}

.footer-section p,
.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

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

    .hero-actions {
        flex-direction: column;
        gap: 1.5rem;
    }

    .video-play-button {
        gap: 0.8rem;
        padding: 8px;
    }

    .video-play-button span {
        font-size: 0.9rem;
    }

    .play-icon {
        width: 45px;
        height: 45px;
    }

    .play-icon i {
        font-size: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text {
        order: 2;
    }

    .about-image {
        order: 1;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .location-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .map-section h3 {
        font-size: 1.5rem;
    }

    .amenities-grid {
        grid-template-columns: 1fr;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .property_imgs .row {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .property_imgs .first {
        height: 300px;
    }
    
    .property_imgs .second {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 150px 150px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .reviews-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .about-text h2 {
        font-size: 2rem;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .nav-logo h2 {
        font-size: 1.2rem;
    }

    .amenity-card,
    .contact-form {
        padding: 1.5rem;
    }

    .review-card {
        padding: 1.5rem;
    }

    .showcase-overlay {
        padding: 1.5rem;
    }

    .reviews-summary {
        padding: 1.5rem;
    }

    .about-text h2 {
        font-size: 1.8rem;
    }

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

img[data-src].loaded {
    opacity: 1;
}
